Skip to content

Instantly share code, notes, and snippets.

@auser
auser / app.js
Last active October 11, 2017 03:01
The complete source for the http://www.ng-newsletter.com/posts/chrome-apps-on-angular.html article. Enjoy!
angular.module('myApp', ['ngRoute'])
.provider('Weather', function() {
var apiKey = "";
this.getUrl = function(type, ext) {
return "http://api.wunderground.com/api/" +
this.apiKey + "/" + type + "/q/" +
ext + '.json';
};
@mdaniel
mdaniel / Vagrantfile
Last active February 21, 2021 10:30
Provision a virtual machine for building ChromeOS using Vagrant <http://www.vagrantup.com>. Just download this into a directory, name it ``Vagrantfile`` (if it isn't already), run ``vagrant up`` followed by ``vagrant ssh`` and you'll see two shell scripts there, ready to sync up the ChromeOS source code.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu1204_64"
@edhemphill
edhemphill / setup-cross-node.sh
Last active December 24, 2021 11:31
A script to help you setup a cross compile shell to build node.js
#!/bin/sh -e
#
# WigWag LLC
# License: this script is public domain
#
# This will setup a shell to cross compile node.js (node 0.8 working for us) using cross tools
# Example uses a Freescale tool chain...
# Adjust vars below to your taste and good luck
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@cowboy
cowboy / Gruntfile.js
Last active December 9, 2015 22:38
grunt 0.4 file.expandMapping and templates
module.exports = function(grunt) {
grunt.initConfig({
stuff: {
dest: 'foo/',
ext: '.bar',
},
log_files: {
my_target: {
files: grunt.file.expandMapping('**/*.js', '<%= stuff.dest %>', {
@shimondoodkin
shimondoodkin / chat.js
Created November 14, 2012 13:22
nodejs express 3 integration of - socket.io with sessions and sessionid handshake
/**
* Module dependencies.
*/
var express = require('express')
// , routes = require('./routes')
// , user = require('./routes/user')
, http = require('http')
, path = require('path');
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 24, 2024 12:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)