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
Geoff-Ford / master-javascript-interview.md
Last active May 20, 2020
Eric Elliott's Master the JavaScript Interview Series
View master-javascript-interview.md
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
fokusferit / enzyme_render_diffs.md
Last active May 19, 2020
Difference between Shallow, Mount and render of Enzyme
View enzyme_render_diffs.md

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@SitePointEditors
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
idleberg / atom-macos-context-menu.md
Last active May 5, 2020
“Open in Atom” in macOS context-menu
View atom-macos-context-menu.md

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
joshcummingsdesign / conf
Last active Jul 17, 2019
NGINX config for a Jekyll site using SSL
View conf
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name example.com www.example.com;
@squarism
squarism / iterm2.md
Last active May 25, 2020
iterm2 cheatsheet
View iterm2.md

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
paulirish / what-forces-layout.md
Last active May 26, 2020
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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
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
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 26, 2020
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

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.