Skip to content

Instantly share code, notes, and snippets.

View rafinskipg's full-sized avatar
🏠
Working from home

Venture rafinskipg

🏠
Working from home
  • web3
  • Worldwide
View GitHub Profile
@christiangenco
christiangenco / download_egghead_videos.md
Last active January 29, 2024 03:16 — forked from ldong/download_egghead_videos.md
download egghead videos
@mollerse
mollerse / gulpfile-express.js
Last active March 28, 2021 20:07
Gulpfile for livereload + static server
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@olov
olov / alternate.js
Last active December 22, 2015 08:18
funny little ES6 for (let;;) example
// according to my guesses of what is to come in future ES6 specs:
// the loop should execute five times so the program should print five numbers at the end
// the fresh-per-iteration x is captured in a closure (that will increment it by 3),
// then executed (for side-effects only) in the cond-expr and post-expr.
// it will never ever modify the outer x thus five loop iterations
(function() {
let arr = [];
let fn = null;
let cnt = 0;
for (let x = 0; (fn && fn()), x < 5; (fn && fn()), x++) {
@rafinskipg
rafinskipg / select_node_types_form.php
Created November 1, 2012 16:10
Node types selection for migration modules forms
$types = node_type_get_types();
$option_types = array();
foreach($types as $type){
$option_types[$type->type] = $type->name;
}
$form['migration_type'] = array(
'#type' => 'select',
'#options' => $option_types,
'#title' => t('Select the contet type to be created?'),
@dongyuwei
dongyuwei / node-reader.js
Created March 14, 2012 04:58
google reader api for nodejs
/*
This library was developed by Will Honey.
It is licensed under the GPLv3 Open Source License
This library requires the underscore library found at http://documentcloud.github.com/underscore/
This library requires the underscore string library found at http://edtsech.github.com/underscore.string/
This library requires the support of localStorage. Updates could be easily made to change that.
*/
/* jslint adsafe: false, devel: true, regexp: true, browser: true, vars: true, nomen: true, maxerr: 50, indent: 4 */
@davemo
davemo / backbone.custom.events.js
Created October 7, 2011 13:38
Using backbone custom events and the observer pattern
// app.js, ommitting IIFE's for brevity
APP = {};
_.extend(APP, Backbone.Events);
// views.js
APP.Views.Login = Backbone.View.extend({