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
{ | |
// 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
<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
#!/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
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
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
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; | |
contract HelloWorld { | |
string public message; | |
int256 public myNumber; | |
address public owner; | |
constructor(string initialMessage) public { | |
message = initialMessage; | |
myNumber = 42; |
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
import 'intersection-observer' | |
/** | |
* Creates a new LazyLoader. | |
* | |
* Will search for images and video elements that have a class of 'lazy' | |
* It will then Target the element's `data-src` / data-srcset property and then | |
* Lazily load the content with an IntersectionObserver or | |
* a fallback method for ancient browswers. | |
* |
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 at bottom of file | |
document.addEventListener('DOMContentLoaded', function () { | |
$(`<style></style>`).appendTo('head').html(`body { background: #222; color: #e6e6e6; } | |
a { color: #949494; } | |
a:link, a:visited { color: #949494; } | |