Skip to content

Instantly share code, notes, and snippets.

Christos Nasikas cnasikas

Block or report user

Report or block cnasikas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Geoff-Ford /
Last active May 20, 2020
Eric Elliott's Master the JavaScript Interview Series
View deploy contract using web3js
const fs = require("fs");
const solc = require('solc')
let Web3 = require('web3');
let web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var input = {
'strings.sol': fs.readFileSync('strings.sol', 'utf8'),
'StringLib.sol': fs.readFileSync('StringLib.sol', 'utf8'),
fokusferit /
Last active May 19, 2020
Difference between Shallow, Mount and render of Enzyme


Real unit test (isolation, no children render)

Simple shallow


  • constructor
  • render
SitePointEditors / dom-helper.js
Created Mar 28, 2017 — forked from m3g4p0p/dom-helper.js
Mini jQuery, sort of.
View dom-helper.js
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
window.$ = (function (undefined) {
* Duration constants
* @type {Object}
idleberg /
Last active May 5, 2020
“Open in Atom” in macOS context-menu

Open in Atom

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /usr/local/bin/atom -n "$@"
  • Set “Pass input” to as arguments
  • Save as Open in Atom
joshcummingsdesign / conf
Last active Jul 17, 2019
NGINX config for a Jekyll site using SSL
View conf
server {
listen 80;
return 301 https://$host$request_uri;
server {
listen 443 ssl;
squarism /
Last active May 25, 2020
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
paulirish /
Last active May 26, 2020
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
chrissimpkins / gist:5bf5686bae86b8129bee
Last active May 23, 2020
Atom Editor Cheat Sheet: macOS
View gist:5bf5686bae86b8129bee

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
yoavniran /
Last active May 26, 2020
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies

You can’t perform that action at this time.