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
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
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
<?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
#!/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
<!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
<?php | |
function generateInsertSQL($table, $fields) { | |
$sql = "insert into `" . $table . "` "; | |
$sql .= "(" . implode( | |
", ", | |
array_map( | |
function($f) { return "`" . $f . "`"; }, | |
array_keys($fields[0]) |
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 (isset($_GET['generate'])) { | |
file_put_contents("generatedReports/" . $_GET['generate'] . ".csv.pending", (string)date(time())); | |
echo json_encode(array('path' => "generatedReports/" . $_GET['generate'] . ".csv", 'filename' => $_GET['generate'] . ".csv")); | |
die(); | |
} | |
if (isset($_GET['check'])) { | |
$files = array(); |
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
var Int6 = (function() { | |
// Base64 ABC contains only A-Z, a-z, 0-9, + and / | |
// (and the = sign but it's just a marker) | |
var ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
return { | |
toChar: function(e) { return ABC.substr(e, 1); }, | |
fromChar: function(e) { return ABC.indexOf(e); } | |
}; | |
}()); |
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 | |
define('DEBUG', true); | |
function debug($message) { | |
if (DEBUG) { | |
echo " -D- ", $message, "\n"; | |
} | |
} |