This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CampaignToken = artifacts.require("CampaignToken"); | |
contract("CampaignToken", async accounts => { | |
it("should deploy with an inital supply", async () => { | |
const instance = await CampaignToken.deployed(); | |
const totalSupply = await instance.totalSupply(); | |
console.log("totalSupply", totalSupply); | |
assert.equal(10000, totalSupply, "balance is not equal"); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol"; | |
// https://theethereum.wiki/w/index.php/ERC20_Token_Standard | |
contract CampaignToken is StandardToken { | |
string public name = "CampaignToken"; | |
string public symbol = "CT"; | |
uint8 public decimals = 5; | |
uint public INITIAL_SUPPLY = 10000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.17; | |
contract Lottery { | |
address public manager; | |
address[] public players; | |
constructor() public { | |
manager = msg.sender; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum update -y | |
yum install httpd php php-mysql stress -y | |
cd /etc/httpd/conf | |
cp httpd.conf htttpdconfbackup.conf | |
rm -rf httpd.conf | |
wget https://s3-eu-west-1.amazonaws.com/acloudguru-wp/httpd.conf | |
cd /var/www/html | |
echo "healthy" > healthy.html | |
wget https://wordpress.org/latest.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img class="lazy" data-src="/some/big/ass/image/that/takes/forever/to/load.jpg" src="/some/small/blurry/image/that/is/shown/first.jpg" alt="The pic"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('=~*~=~*~=~*~=~*~=~*~=');", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var XLSX = require('xlsx'); | |
console.log('app starting') | |
const SOURCE = './source/listOfFilesYouWantToGenerate.xlsx'; | |
const QUESTIONS = './source/sourceFileThatNeedsToBeCopiesManyTimes.xlsx'; | |
const TARGET = './vendors'; | |
const sourceFile = XLSX.readFile(SOURCE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsh interface portproxy add v4tov4 listenport=8001 listenaddress=127.0.0.1 connectport=8001 connectaddress=10.0.2.2 | |
# Change listenport and connectport to the port you desire | |
Working on a mac and need to test on IE 11 or Edge with a local dev build? Get a VM for the browser you need from developer.microsoft.com | |
Then open command prompt as admin and pase the code above with the port you need. As an example I may have a local sever on port 3000 on mac. | |
I need my VM to see this port. I replace connectport and listen port with 3000 and paste this magical line into command prompt to build | |
the bridge I need. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Default font size set by browsers 16px | |
$browser-context: 16; | |
// Calculates the rem value so it can be applied everywhere; | |
// | |
// @param an integer font size in px | |
// @param an integer reference size in px | |
// @return a string with rem unit. | |
// | |
@function rem($pixels, $context: $browser-context) { |