A simple ruby-script which uses em-http-request to send an API request to the Pingdom API to pause or unpause all checks.
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
| setTimeout(function(){ | |
| var $div = $('div:last'), | |
| marginTop = parseFloat($div.css('margin-top')); | |
| $div.css({ | |
| 'margin-top' : Math.round(marginTop) | |
| }); | |
| }, 250); |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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
| library(inline) | |
| inc <- ' | |
| /* This is taken from envir.c in the R 2.15.1 source | |
| https://github.com/SurajGupta/r-source/blob/master/src/main/envir.c | |
| */ | |
| #define FRAME_LOCK_MASK (1<<14) | |
| #define FRAME_IS_LOCKED(e) (ENVFLAGS(e) & FRAME_LOCK_MASK) | |
| #define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK)) | |
| ' |
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 | |
| /bin/bash -l -c 'export RUBYOPT="" && lolcommits --capture' | |
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
| require 'net/http' | |
| require 'uri' | |
| class Admin::MouseflowController < ApplicationController | |
| #these are optional if you using authentication and ssl | |
| skip_before_filter :authenticate_login! | |
| def ssl_required? | |
| false |
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
| ISO 3166 Country Code | ISO639-2 Country Code | Country | ISO 3166 Country Code | ISO639-2 Lang | Language | Date Format | |
|---|---|---|---|---|---|---|---|
| ALB | AL | Albania | sqi | sq | Albanian | yyyy-MM-dd | |
| ARE | AE | United Arab Emirates | ara | ar | Arabic | dd/MM/yyyy | |
| ARG | AR | Argentina | spa | es | Spanish | dd/MM/yyyy | |
| AUS | AU | Australia | eng | en | English | d/MM/yyyy | |
| AUT | AT | Austria | deu | de | German | dd.MM.yyyy | |
| BEL | BE | Belgium | fra | fr | French | d/MM/yyyy | |
| BEL | BE | Belgium | nld | nl | Dutch | d/MM/yyyy | |
| BGR | BG | Bulgaria | bul | bg | Bulgarian | yyyy-M-d | |
| BHR | BH | Bahrain | ara | ar | Arabic | dd/MM/yyyy |
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
| b <- function(path = "package/", ...){ | |
| require(devtools) | |
| require(roxygen2) | |
| pkg <- as.package(path) # package pointer | |
| ## update documentation | |
| message("Updating documentation...") | |
| roxygenise(path, ...) |
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
| all <- iconvlist() | |
| names(all) <- all | |
| tries <- llply(all[330:350], function(cur) iconv(song$artist, cur, "UTF-8")) | |
| vapply(tries, function(x) sum(is.na(x)), integer(1)) |