Skip to content

Instantly share code, notes, and snippets.

View ergoz's full-sized avatar
😈
let's rock

[riftlab] ErgoZ ergoz

😈
let's rock
View GitHub Profile
<?php
// "!defined('determinator') == "include_once" for sneaky people.
if (!defined("determinator")){
function determinator_feof($file_pointer, &$now = NULL) {
// Assigning a value to $now in this function changes
// the value of whatever variable the calling function
// passed in. Functions with side effects... huzzah!
$now = microtime(true);
// Have we reached the end of the file?
# install dependencies
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
# clone cpuminer
git clone https://github.com/pooler/cpuminer.git
# compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
#!/usr/bin/env ruby
#encoding: utf-8
# Внимание! Скрипт работает только на версии ruby 2.0
# create_rus_ruby_book filename -> возвращается результат обработки файла;
# create_rus_ruby_book dirname -> все *.md файлы будут обработаны. Результат сохраняется в *.tex файл с тем же именем (файл будет перезаписан).
require 'redcarpet'
\ProvidesPackage{rus_ruby_book}
\clubpenalty=10000 % запрет разрыва после первой строки абзаца.
\widowpenalty=10000 % запрет разрыва перед последней строкой абзаца.
\tolerance=5000
\RequirePackage{xltxtra}
\RequirePackage{xunicode}
\RequirePackage{xecyr}
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
<?php
/**
* DuplicateFilter prevents Yii from exposing URLs starting with /index.php/ when showScriptName is false. Such
* URLs are automatically redirected to proper ones.
*
* To use add the following to your controller:
*
* ```php
* public function filters() {
* return array(