Skip to content

Instantly share code, notes, and snippets.

@learningjs
learningjs / gmail.sh
Last active August 29, 2015 14:25 — forked from smlb/gmail.sh
USER=your_username
PASS=your_passwd
COUNT=`curl -su $USER:$PASS https://mail.google.com/mail/feed/atom || echo "<fullcount>unknown number of</fullcount>"`
COUNT=`echo "$COUNT" | grep "<fullcount>" | sed -e s/"<fullcount>"// -e s/"<\/fullcount>"//`
echo $COUNT
if [ "$COUNT" != "0" ]; then
if [ "$COUNT" = "1" ];then
WORD="mail";
else
USER=`whoami`
KERNEL=`uname -r`
OS=`hostnamectl status | awk 'NR==6{print $3,$4}'`
HOST=`hostnamectl status | awk 'NR==1{print $3}'`
ROOT_TOT=`df -h | awk 'NR==2{print $2}' | sed 's/G//g'`
ROOT_OCCUPIED=`df -h | awk 'NR==2{print $3}' | sed 's/G//g'`
PACKAGES=`pacman -Qq | wc -l`
CPU=`echo -e : $(cat /proc/cpuinfo | awk 'NR==5{$1=$2=$3="";print}')`
CONNECTION=`[[ -x /usr/bin/iwgetid ]] && echo -e $(iwgetid -r) || echo "missing iw package"`
RES="\033[0m"
Resurrection Remix ROM
Source Code: http://github.com/ResurrectionRemix
Website: http://www.resurrectionremix.com
For extended changelog, track github activities
The Changelog
# Resurrection Remix Lollipop 5.1.1 - v5.5.4
@learningjs
learningjs / introrx.md
Created October 2, 2015 00:35 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@learningjs
learningjs / d3.sankey.js
Created December 6, 2015 14:50 — forked from emeeks/d3.sankey.js
Sankey Particles III
d3.sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
nodes = [],
links = [];
sankey.nodeWidth = function(_) {
if (!arguments.length) return nodeWidth;
@learningjs
learningjs / README.md
Created December 6, 2015 14:51 — forked from mbostock/.block
Wave Motion

A recreation of a lovely GIF by Dave Whyte. As the Exploratorium explains, “Wave motion at the surface of water is made up of small circular motions of parcels of water.”

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@learningjs
learningjs / 12-days.js
Created December 28, 2015 04:03 — forked from addyosmani/12-days.js
12 Days of Christmas in ES2015 - paste this into your DevTools console!
// adapted from https://tonicdev.com/n3dst4/twelve-days-of-emoji
// full credit to n3dst4. I just rewrote this to be browser developer tools friendly.
const pressies = [
"🐦🍐🌳",
"🐢🐦",
"🇫🇷🐔",
"📞🐦",
"💛💍",
"🐦🍳 ",
"🐦🏊",
@learningjs
learningjs / migration-guide.md
Created December 28, 2015 05:42 — forked from staltz/migration-guide.md
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example: