Skip to content

Instantly share code, notes, and snippets.

View rballen's full-sized avatar

robert b. allen rballen

View GitHub Profile
@rballen
rballen / README.md
Last active March 21, 2017 23:51 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@rballen
rballen / gEncodeH264WithPreviews.sh
Created February 16, 2017 14:21 — forked from jetsonhacks/gEncodeH264WithPreviews.sh
Using Gstreamer, take a h264 stream from a Logitech c920, preview it on the display and save it to a file along with the webcam audio.
#!/bin/sh
# Preview and save webcam video on NVIDIA Jetson TK1
# Grab audio and video (in h264 format) from Logitech c920 @ 1920x1080
# Preview @ 1280x720 on screen
# Store video to file named gEncode1080p.mp4
# Logitech c920 is video1 on this machine
VELEM="v4l2src device=/dev/video1 do-timestamp=true"
# Video capability from the camera - get h264 1920x1080
VCAPS="video/x-h264, width=1920, height=1080, framerate=30/1"
@rballen
rballen / RamCleanup.bash
Created February 3, 2017 18:44
cleanup RAM in linux systems
sudo -i // goto root shell
#To free pagecache:
echo 1 > /proc/sys/vm/drop_caches
#To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches
#To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
@rballen
rballen / tweakfirefox.txt
Created February 3, 2017 18:42
Tweak Firefox for Linux
Goto the URL:
about:config
configure the following settings:
browser.sessionstore.resume_from_crash;false
extensions.pocket.enabled;false // disable Pocket
loop.enabled;false // disable Hello
media.autoplay.enabled;false // disable fucking Video autoplay function
browser.newtabpage.directory.ping; ""
browser.newtabpage.directory.source; ""
@-moz-document regexp("https?://www.google.(com|([a-z]{2}))(.[a-z]{2})?."), regexp("https?://www.google.(com|([a-z]{2}))(.[a-z]{2})?/((\\?|webhp|search|gfe_rd|auth|gws_rd|#q|imghp|#gfe_rd|#safe|#pws|#tbs).*)"), regexp("https?://encrypted.google.(com|([a-z]{2}))(.[a-z]{2})?/((\\?|webhp|search|gfe_rd|auth|gws_rd|#q|imghp|#gfe_rd|#safe|#pws|#tbs).*)"), regexp("https?://encrypted.google.(com|([a-z]{2}))(.[a-z]{2})?."), regexp("https?://www.google.(com|([a-z]{2}))(.[a-z]{2})?/_/chrome/newtab\\?.*") {
/*
Author > memoryleakx
License > cc by-sa 3.0
Created > Apr 23, 2016
Github > https://gist.github.com/memoryleakx/74f5d1be16f93d7d65c1cbcdaec59298
*/
html,
@rballen
rballen / .eslintrc
Last active April 7, 2017 19:11 — forked from ghostwords/.eslintrc
eslint
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
<ul>
<li>
<a href="" class="list-item">
<i class="icon-home"></i>
</a>
</li>
<li>
<a href="" class="list-item">
<i class="icon-edit"></i>
</a>
@rballen
rballen / justified.html
Last active December 23, 2015 00:49
css:sass easy justified links
<!doctype html>
<style>
body {
background: #eee;
font: 600 16px/1 "Source Code Pro";
}
.justified {
border-radius: 3px;
background-color: #2c3e50;
@rballen
rballen / colorScheme.html
Last active December 22, 2015 13:58
css:sass using the compass color-scheme module for generating color schemes from 1 base color. load this gist at http://sassbin.com/
<div class="content">
analogic scheme
<ul class="color-guide">
<li class="brand">brand</li>
<li class="primary">primary</li>
<li class="secondary">secondary</li>
<li class="tertiary">tertiary</li>
<li class="quadrary">quadrary</li>
<li class="blue">blue</li>
<li class="green">green</li>
@rballen
rballen / icons.html
Last active December 20, 2015 18:48
css3:font icons - collection accessed via api
<nav class="main">
<ul>
<li><a href="#" class="fontawesome-home"></a></li>
<li><a href="#" class="fontawesome-edit"> </a></li>
<li><a href="#" class="fontawesome-paste"></a></li>
<li><a href="#">&#2384;</a></li>
<li class="active"><a href="#" class="fontawesome-github-alt"></a></li>
<li><a href="#" class="fontawesome-beaker"></a></li>
<li><a href="#" class="fontawesome-camera-retro"></a></li>
<li><a href="#" class="fontawesome-user"></a></li>