Skip to content

Instantly share code, notes, and snippets.

View karimsa's full-sized avatar

Karim Alibhai karimsa

View GitHub Profile
@joepie91
joepie91 / .md
Last active November 30, 2017 14:42
About the Ayo fork of Node.js

This is a brief post to answer some of the common questions about Ayo (a fork of Node.js), to cut down on the noise in #Node.js. Keep in mind that I'm in no way associated with Ayo, this is just an attempt to cover some of the frequent questions.

Important note: Be aware that discussion about the political reasons behind the Ayo fork is considered off-topic in the #Node.js channel, as that channel is primarily intended for technical support, and this is a topic that is very likely to invite trolling and polarization.

If you wish to discuss the politics behind the fork, there are plenty of comment threads around the web on the usual sites; Hacker News, Reddit, and so on. Please direct your discussion there instead.

Discussions in #Node.js about the technical aspects of the Ayo fork (eg. compatibility) are, of course, fine.

Why was Ayo forked?

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@valenvb
valenvb / jrun.py
Last active January 29, 2016 00:25
Makes running Java programs while developing slightly easier.
#!/usr/bin/python
# Copy this file to your path (/usr/local/bin is a good choice)
# You may need to make it executable with chmod 755
# Should be compatible with Python 2.7.x and 3.x
# Usage: jrun <file[.java]>
from subprocess import call
import sys
if len(sys.argv)==1:
@mutewinter
mutewinter / commit_format_examples.txt
Created March 19, 2014 18:52
Examples of my commit format.
chore: add Oyster build script
docs: explain hat wobble
feat: add beta sequence
fix: remove broken confirmation message
refactor: share logic between 4d3d3d3 and flarhgunnstow
style: convert tabs to spaces
test: ensure Tayne retains clothing
@xeoncross
xeoncross / ajax.js
Last active August 3, 2023 06:06
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
/**
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
*
* @param string url
* @param object callback
* @param mixed data
* @param null x
*/
function ajax(url, callback, data, x) {
try {
@joeyAghion
joeyAghion / mongodb_collection_sizes.js
Last active May 23, 2024 15:30
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
stats = stats.sort(function(a, b) { return b['size'] - a['size']; });
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); }
@EpokK
EpokK / ngEnter.js
Last active January 7, 2022 13:57
ngEnter directive if you can use submit form(https://twitter.com/ririlepanda)
app.directive('ngEnter', function() {
return function(scope, element, attrs) {
element.bind("keydown keypress", function(event) {
if(event.which === 13) {
scope.$apply(function(){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active July 21, 2024 01:20
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh