Skip to content

Instantly share code, notes, and snippets.


S. M. AMRAN smamran

View GitHub Profile
uzxmx / enable_nativebridge
Created Jan 28, 2018
android x86 /system/bin/enable_nativebridge
View enable_nativebridge
if [ -z "$1" ]; then
if [ "`uname -m`" = "x86_64" ]; then
pcan /
Created Apr 3, 2017
Compile Redis with Cygwin


Install Cygwin with make, gcc & g++. Download Redis tar.gz package, unpack it.


Edit deps/hiredis/net.c and add the following lines just after the include directives:

ipbastola /
Last active Sep 14, 2021
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64


Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
blacklee /
Created Feb 19, 2016
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4
AnimeshShaw /
Last active Jul 5, 2017
Dragon Fractal in Java
package dragon;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage;
View file0.txt
$ wget -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran
View download-list
* Downloaded or downloading
jinroh /
Last active Sep 13, 2021
Fourier series visualisation with d3.js.

From Wikipedia:

In mathematics, a Fourier series decomposes periodic functions or periodic signals into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or complex exponentials).

Use the bottom right form to change the visualized serie.

sio2boss / client-socket-reconnect.js
Created Aug 25, 2013
Node.js Re-connecting Socket
View client-socket-reconnect.js
// Simple example of using net.Socket but here we capture the
// right events and attempt to re-establish the connection when
// is is closed either because of an error establishing a
// connection or when the server closes the connection.
// Requires
var net = require('net');
tedmiston / nodejs-tcp-example.js
Last active Sep 7, 2021
Node.js TCP client and server example
View nodejs-tcp-example.js
In the node.js intro tutorial (, they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
var net = require('net');