Skip to content
View php_tiny_curl.php
function encodeURIComponent($str) {
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
}
class curl_onHeaders
{
View fix vanilla forum hhvm
fix vanilla forum hhvm
An iterator cannot be used with foreach by reference.
find /var/www/forum -type f -exec perl -i -p -e "s/(foreach.+?as\s*)&/\1/" {} \;
View bench.sh
#!/bin/bash
# if memory to memory is 0kb/s then the size is too large or problem writing /run/shm
# instant use:
# wget -O- https://gist.githubusercontent.com/shimondoodkin/defae1e5f9c1aaabb1c7/raw/bench.sh | size=150 bash
# wget -O- https://gist.githubusercontent.com/shimondoodkin/defae1e5f9c1aaabb1c7/raw/bench.sh | size=512 bash
# download then use
View learning matlab in an hour.md

from https://www.coursera.org/learn/machine-learning/supplement/Mlf3e/more-octave-matlab-resources

More Octave/MATLAB resources

Octave Resources At the Octave command line, typing help followed by a function name displays documentation for a built-in function. For example, help plot will bring up help information for plotting. Further documentation can be found at the Octave documentation pages.

MATLAB Resources At the MATLAB command line, typing help followed by a function name displays documentation for a built-in function. For example, help plot will bring up help information for plotting. Further documentation can be found at the MATLAB documentation pages.

View steamingFrequentTermsKeywords.java
package com.nini;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;
View ThinBTClient.java
/*
licence pubilc domain
prepered by Shimon Doodkin
vibrate a vibrating bluetooth bracelet
a simple bt client it sends "RING" AT command to a device named "BRACELET"
it is a good "android bluetooth client example".
View 1)src_MainActivity.java
package com.doodkin.example;
import android.support.v7.app.ActionBarActivity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
View setup_ufw.sh
apt-get install fail2ban
apt-get install iptables-persistent
apt-get install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh/tcp
ufw allow www
ufw allow smtp
ufw allow pop3
ufw enable
View large_detable_float.js
//try take advantage of inacurate large exponent of double floating point to compare decimal numbers.
var large_detable_float=function(point){ if(point){this.maxfloat=parseFloat("1"+Array((Number.MAX_SAFE_INTEGER*point).toFixed(0).length+1).join("0"));}this.a=0; this.b=0;};
large_detable_float.prototype={
maxfloat:100000000,
add:function(a){ if(a<0) return this.sub(-a);
if(this.a+a<this.maxfloat)this.a+=a;
else {this.a-=this.maxfloat;this.b+=this.maxfloat;this.a+=a;}
},
sub:function(a){ if(a<0) return this.add(-a);
if(this.a-a>-this.maxfloat)this.a-=a;
View module developed.js
// this grown up to a module -
// https://github.com/shimondoodkin/efficient-rolling-stats
Something went wrong with that request. Please try again.