Skip to content
View digging through node.js modules
function s(m,n){ var x=n&&m.children.filter(function(e){return e.filename.indexOf(n)!=-1})||[]; if(x.length) return x[0]; else console.log(n+' not found',m.children.map(function(e){return e.filename})); }
s(require.main)
to print a list
var xapp=s(require.main,'app')
View encaspulating header protocol
// encapsulating header protocol:
//
// FAQ:
//
// why it is useful?, answer: to minimize use of JSON.parse, which is cpu inefficient.
//
// where ware it was inteded to be used? answer: on a plain socket or a websocket, like sockjs.
//
// note: there is a similar "STOMP" protocol, which is simpler(not encapsulating).
//
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
Something went wrong with that request. Please try again.