Skip to content

Instantly share code, notes, and snippets.

View dheerajbhaskar's full-sized avatar

Dheeraj Bhaskar dheerajbhaskar

View GitHub Profile
@peterhellberg
peterhellberg / ffserver.conf
Last active December 2, 2022 06:30
MJPEG stream from Webcam using FFServer and FFMpeg
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 200M
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@samwize
samwize / mocha-guide-to-testing.js
Created February 8, 2014 05:53
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@Zulko
Zulko / rapunzel_moviepy.py
Last active May 1, 2023 21:22
Tangled + MoviePy
"""
This creates the following GIF, where the text appears to be "embedded"
in the video and "disappears" behind rapunzel.
http://i.imgur.com/gxEHfLX.gif
"""
from moviepy.editor import *
import numpy as np
import skimage.morphology as skm
@yano3
yano3 / gist:1378948
Created November 19, 2011 15:17
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@jaydeepw
jaydeepw / enableHTML5AppCache.java
Last active October 5, 2023 11:39
Enabling HTML5 AppCache in Android Webview programatically.
private void enableHTML5AppCache() {
webView.getSettings().setDomStorageEnabled(true);
// Set cache size to 8 mb by default. should be more than enough
webView.getSettings().setAppCacheMaxSize(1024*1024*8);
// This next one is crazy. It's the DEFAULT location for your app's cache
// But it didn't work for me without this line
webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache");
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@cheeaun
cheeaun / js-error-logging-services.md
Last active December 10, 2023 13:04
JavaScript error logging services
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active January 16, 2024 21:15
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages