Skip to content

Instantly share code, notes, and snippets.

@bomberstudios
bomberstudios / Bizcocho de limón.md
Created December 21, 2014 10:58
Receta de bizcocho de limón definitivo

Bizcocho de limón

Ingredientes

  • 3 huevos
  • un vasito de yogur de limón de 125gr
  • Raspadura de cascara de medio limón
  • Azúcar
  • harina de repostería
  • aceite de oliva
@cou929
cou929 / detect-private-browsing.js
Last active May 1, 2024 21:07
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
public class Time {
public static String formatTime(long t) {
StringBuffer o = new StringBuffer();
long dsecs = (t/10)%100;
long secs = (t/1000)%60;
long mins = t/(60*1000);
if(mins < 10) {
o.append('0');
@dpup
dpup / if-github-up.sh
Created December 11, 2012 19:30
Script that checks if GitHub is up before running a command
#!/bin/bash
#
# Script that checks GitHub's status API before continuing. If GitHub does not return "good" then
# you will be prompted whether you want to continue.
#
# Information messages are echoed to stderr so it is still possible to pipe the results of stdout to
# a file.
#
# Example Usage:
# $ if-github-up make clean
@bomberstudios
bomberstudios / muji-dotted-paper.ps
Created July 20, 2012 11:24
Print your own Muji dotted paper in A4 format (open in Preview.app, print at 100% scale)
%!PS-Adobe-3.0
% Title: dot grid paper, 5x5 mm
%%BeginSetup
%%BeginFeature: *PageSize A4
<< /PageSize [ 595.27 841.889 ]
/ImagingBBox null
>> setpagedevice
%%EndFeature
%%EndSetup
@badsyntax
badsyntax / build.sh
Created January 11, 2011 20:56
An example PHP & BASH Post-Receive github web hook to package projects
#! /usr/bin/env bash
#clone the repo
git clone -q "${1}" "clones/${2}"
cd "clones/${2}"
#update the submodules (how do we handle errors here?)
git submodule --quiet update --init --recursive