Skip to content

Instantly share code, notes, and snippets.

View ColCh's full-sized avatar

Max Sysoev ColCh

View GitHub Profile
@DmitrySoshnikov
DmitrySoshnikov / expression-only.md
Last active April 16, 2016 12:00
ES: Expression only

"Everything is an expression"... since ES1?

Many languages support "expression-only" semantics, allowing to use any construct in an expression position.

NOTE: the difference between expressions and statements is that the former produce a value, while the later don't.

For example, Ruby's if-expression:

x = 10
@shizmob
shizmob / pomfload
Last active July 5, 2018 14:08
simple pomf uploader
#!/bin/sh
downpomf="https://a.pomf.cat/"
uppomf="https://pomf.cat/upload.php"
if test $# -lt 1 ; then
echo "Usage: `basename $0` FILE [FILE...]"
exit 1
fi
set=
@developit
developit / hydra-alias.md
Last active February 27, 2020 01:54
Alias to invoke Chrome Canary w/ tracing, for IRHydra

An Alias to run Chrome with tracing enabled

For Chrome Canary:

alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'

For regular ol' Chrome:

@benatkin
benatkin / Global.sublime-settings
Created July 20, 2011 04:26
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
@ryanflorence
ryanflorence / Dialog.js
Last active January 9, 2021 16:12
React Portal.js
var Dialog = React.createClass({
mixins: [Portal],
createPortal: function() {
this.dialog = $(this.portalNode).dialog({
autoOpen: false,
title: this.props.title,
close: this.props.onClose
}).data('ui-dialog');
},
@ivan-loh
ivan-loh / gist:ee0d96c3795e59244063
Last active March 3, 2021 13:26
Node.JS ( & pm2 ) Process Memory Limit
# Plain Ol' Node
node --max-old-space-size=1024 app.js # increase to 1gb
node --max-old-space-size=2048 app.js # increase to 2gb
node --max-old-space-size=3072 app.js # increase to 3gb
node --max-old-space-size=4096 app.js # increase to 4gb
node --max-old-space-size=5120 app.js # increase to 5gb
node --max-old-space-size=6144 app.js # increase to 6gb
# For pm2
pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@tkarpinski
tkarpinski / EnableLinkedConnections.reg
Created January 5, 2012 16:47
A reg file to EnableLinkedConnections (Network Drives over UAC) http://support.microsoft.com/kb/937624
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLinkedConnections"=dword:00000001
@max-mykhailenko
max-mykhailenko / # Sublime Emmet JSX Reactjs.md
Last active November 25, 2022 23:25
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin

This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/

Thanks, @wesbos

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
@perrygeo
perrygeo / TODO
Last active December 31, 2022 21:24
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio