there's a bash script for this now: clirepo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////// | |
/// Grid Directive to Angular 1.0.0rc7 | |
////////////////////////////////////// | |
// To use: | |
// <script> | |
// var app = angular.module('myapp', ['ngGrid']); | |
// var Ctrl = function($scope) { $scope.todo = [...] } | |
// </script> | |
// <div ng-app="myapp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h = require('hyperscript'); | |
var CronJob = require('cron').CronJob; | |
var nodemailer = require('nodemailer'); | |
var craigslist = require('node-craigslist'); | |
var options = { | |
category : 'cta', | |
maxAsk : '9000', | |
minAsk : '1000' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generateUniqueID = () -> | |
_p8 = (s) -> | |
p = (Math.random().toString(16)+"000000000").substr(2,8) | |
if s then "-" + p.substr(0,4) + "-" + p.substr(4,4) else p | |
_p8() + _p8(true) + _p8(true) + _p8() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Build, (with your favorite compiler) run: | |
* cc -o vlcwrap vlcwrap.c */ | |
#include <unistd.h> | |
#include <signal.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define VLC_BIN "/Applications/VLC.app/Contents/MacOS/VLC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var floorButtons = new Array(floors.length); | |
var floorTime = new Array(floors.length); | |
var UP = 1; | |
var DOWN = 2; | |
var DISABLED = 4; | |
for (var i = 0; i < floorButtons.length; i++) { | |
floorButtons[i] = 0; | |
floorTime[i] = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(x,y = function(){ return x; }) { | |
console.log( "a:", x ); | |
var x = 1; | |
console.log( "b:", y() ); | |
} | |
foo(2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I hear no princess in the night | |
But Link hears all her whispers of defenestration | |
He’s coming in, paraglider flight | |
The sheikah slate reflects the past that guides him toward salvation | |
Got stopped by an old man along the way | |
Hoping to find some long forgotten tech or ancient memories | |
He turned to me as if to say, “Hurry boy, she’s waiting there for you" | |
It's gonna take a lot to clean up all that evil goo | |
There's nothing in a hundred years or more that they could do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash completion for Yeoman generators - tested in Ubuntu, OS X and Windows (using Git bash) | |
function _yo_generator_complete_() { | |
# local node_modules if present | |
local local_modules=$(if [ -d node_modules ]; then echo "node_modules:"; fi) | |
# node_modules in /usr/local/lib if present | |
local usr_local_modules=$(if [ -d /usr/local/lib/node_modules ]; then echo "/usr/local/lib/node_modules:"; fi) | |
# node_modules in user's Roaming/npm (Windows) if present | |
local win_roam_modules=$(if [ -d $(which yo)/../node_modules ]; then echo "$(which yo)/../node_modules:"; fi) | |
# concat and also add $NODE_PATH | |
local node_dirs="${local_modules}${usr_local_modules}${win_roam_modules}${NODE_PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const execa = require('execa') | |
const jsf = require('json-schema-faker') | |
;(async () => { | |
const { stdout } = await execa( | |
'./node_modules/.bin/ts-json-schema-generator', | |
[ | |
'--path', | |
'./organizations.ts', | |
'--type', |
OlderNewer