Skip to content

Instantly share code, notes, and snippets.

View heldrida's full-sized avatar
🇲🇿
Peace for Mozambique!

Helder Oliveira heldrida

🇲🇿
Peace for Mozambique!
View GitHub Profile
@staltz
staltz / introrx.md
Last active April 24, 2024 18:10
The introduction to Reactive Programming you've been missing
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
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
@UtahDave
UtahDave / saltsample_09252012_01
Created September 26, 2012 02:54 — forked from l2ol33rt/saltsample_09252012_01
Saltstack sample of using states and pillars for users
Here is a sample of how I am currently dealing with users.
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states
###
# How to create password hashes
###
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')"
###
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
define(['angular', 'masonry', 'imagesLoaded', 'lodash'], function(angular, Masonry, imagesLoaded, _){
'use strict';
/**
* Masonry Directive for a wall of item.
* This directive is intended to be used along with ng-repeat directive.
* Put masonryWallDir on the container element and pass in a class selector for each item to be laid out.
* Pass in optional options via masonryWallOptions.
* Put the masonryItemDir next to ng-repeat directive on the item to be repeated.