Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains hidden or 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
| // ==UserScript== | |
| // @name Gist UserScript Install Link | |
| // @author Erik Vold | |
| // @namespace gistUserScriptInstallLink | |
| // @include http://gist.github.com/* | |
| // @version 0.1 | |
| // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
| // @datecreated 2010-01-28 | |
| // @lastupdated 2010-01-28 | |
| // @description This userscript will add an 'Install' link to all userscript files (which end with .user.js by necessity). |
This file contains hidden or 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
| // ==UserScript== | |
| // @name jQuery For Chrome (A Cross Browser Example) | |
| // @namespace jQueryForChromeExample | |
| // @include * | |
| // @author Erik Vergobbi Vold | |
| // @description This userscript is meant to be an example on how to use jQuery in a userscript on Google Chrome. | |
| // ==/UserScript== | |
| // a function that loads jQuery and calls a callback function when jQuery has finished loading | |
| function addJQuery(callback) { |
This file contains hidden or 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
| import java.lang.Math.*; | |
| public class Progressbar { | |
| private int max; | |
| private int current; | |
| private String name; | |
| private long start; | |
| private long lastUpdate; | |
| public Progressbar(int max, String name) |
This file contains hidden or 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
| package de.kopis.camel.model; | |
| import org.apache.camel.dataformat.bindy.annotation.CsvRecord; | |
| import org.apache.camel.dataformat.bindy.annotation.DataField; | |
| @CsvRecord(separator = ",") | |
| public class CsvBean { | |
| @DataField(pos = 1) | |
| private String first; | |
| @DataField(pos = 2) |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| import datetime | |
| frankierart={ | |
| 0x01:'Stampit 2003', | |
| 0x02:'0x02???', | |
| 0x03:'Frankit', | |
| 0x05:'Filiale', | |
| 0x07:'Frankierservice Infopost/Infobrief', | |
| 0x08:'Premiumadress', |
This file contains hidden or 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
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or 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
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| #------------------------------------------------------------------------------- | |
| # NOTES: | |
| #------------------------------------------------------------------------------- | |
| # * User @jimklimov (and probably some others called out in the long comment | |
| # thread below) have modified this script to make it more robust and keep | |
| # up with various changes in the GitHub API and response format at: | |
| # https://github.com/jimklimov/github-scripts |
OlderNewer