Skip to content

Instantly share code, notes, and snippets.

View samdsg's full-sized avatar
🎯
Focusing

Samuel Anthony samdsg

🎯
Focusing
View GitHub Profile
@samdsg
samdsg / nft-market.sol
Created July 7, 2022 12:12 — forked from pguso/nft-market.sol
Basic NFT Marketplace with Price Feed (MATIC to USD)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract NFT is ERC721URIStorage {
@samdsg
samdsg / meta-tags.md
Created February 26, 2021 17:53 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@samdsg
samdsg / dataURL to blob and blob to dataURL
Created September 22, 2020 16:02 — forked from wuchengwei/dataURL to blob and blob to dataURL
dataURL to blob and blob to dataURL
//**dataURL to blob**
function dataURLtoBlob(dataurl) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while(n--){
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], {type:mime});
}
@samdsg
samdsg / readme.md
Created August 23, 2020 01:44 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

Todo

  • Slides

  • Installation


composer create-project --prefer-dist laravel/laravel blog

@samdsg
samdsg / build.gradle
Created October 10, 2019 14:49 — forked from rwinch/build.gradle
Gradle DependencyResolveDetails example
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework:spring-core', // spring-core has no version specified
// security brings in spring version 3.0.7
'org.springframework.security:spring-security-core:3.1.4.RELEASE'
@samdsg
samdsg / mongodb_cheat_sheet.md
Created September 10, 2019 08:17 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@samdsg
samdsg / countries.php
Created August 5, 2019 09:16 — forked from josephilipraja/countries.php
List of Countries with Country code & Telephone (Dial) Code as a PHP Array. Bonus: PHP function to list all Countries as HTML Select Tag Options with their 2 character Country code as values
<?php
$countryArray = array(
'AD'=>array('name'=>'ANDORRA','code'=>'376'),
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'),
'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'),
'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'),
'AI'=>array('name'=>'ANGUILLA','code'=>'1264'),
'AL'=>array('name'=>'ALBANIA','code'=>'355'),
'AM'=>array('name'=>'ARMENIA','code'=>'374'),
'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'),

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH