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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Experiments</title> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Experiments <small>list of available items</small></h1> |
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 node | |
function iNeedAnswers() { | |
var args = Array.prototype.slice.call(arguments), | |
answerCount = 0, | |
answers; | |
if (args.length < 1) { sampleRate = 1000; } | |
else if (parseInt(args[0], 10) != args[0]) { sampleRate = 1000; } | |
else { sampleRate = parseInt(args.shift(), 10); } |
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
<?php | |
if (array_key_exists('profileUrl', $_POST)) { | |
$url = $_POST['profileUrl']; | |
} else { | |
$url = "https://plus.google.com/u/0/+SergeyBrin/posts"; | |
} | |
$url = preg_replace('/u\/\d+\//', '', $url); | |
$ch = curl_init(); |
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
use Origanum\Lib\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Symfony\Component\HttpFoundation\Response; |
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
From 0520fc27da8a63b4db7fbe4f732056004708cb0c Mon Sep 17 00:00:00 2001 | |
From: Balazs Nadasdi <[email protected]> | |
Date: Tue, 17 Feb 2015 10:48:53 +0100 | |
Subject: [PATCH] cross platform patch | |
--- | |
__init__.py | 7 +++++-- | |
loadik.py | 8 +++++--- | |
main_brush.py | 10 +++++++--- | |
3 files changed, 17 insertions(+), 8 deletions(-) |
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 main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strconv" | |
"strings" | |
) |
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: cover build | |
coverFile := $(shell mktemp -u -t cover.out.XXXXXX) | |
projectName := $(shell basename `pwd`) | |
hasGocov := #$(shell which gocov) | |
packages := $(shell go list ./...) | |
ifndef OUTPUT | |
OUTPUT = "text" | |
endif |
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 node | |
var sys = require("sys"), | |
spawn = require('child_process').spawn; | |
/* | |
* htmlEntities function is from Chris Coyier | |
* URL: http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/ | |
*/ | |
function htmlEntities(str) { |
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
// ... cut | |
Users.findById(id, function(err, result) { | |
if (err) { | |
// OMG! We got an error | |
return response.redirect('/404.html'); | |
} | |
// nice we can do something with user | |
}); | |
// ... cut |
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
jQuery(function() { | |
var archive = jQuery('.widget_archive li a').toArray().map(function(item) { | |
var t = item.innerText.split(/ /); | |
return { | |
'link': item.getAttribute('href'), | |
'year': parseInt(t[1], 10), | |
'month': t[0], | |
'count': parseInt(item.parentNode.innerText.match(/\(([0-9]+)\)$/)[1], 10) | |
}; | |
}).reduce(function(memo, item) { |