This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |
#include <stdio.h> | |
/* | |
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th | |
* Bernoulli number. | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
// ------------------------------------------------------------------------ | |
// Data |
// Immutable Stack Type using List | |
case class Stack[A] (elems: Seq[A] = List.empty[A]) { | |
def push(v: A) : Stack[A] = Stack(v +: elems) | |
def pushAll(xs: Iterable[A]) : Stack[A] = | |
xs.foldLeft (this) ((accStack, e) => accStack.push(e)) | |
def pop(): Either[String, (A, Stack[A])] = { | |
if (isEmpty) Left("Cannot pop from empty stack") |
# Usage: ruby last_game.rb <summoner_name> <na/euw/...> | |
require "net/http" | |
require "json" | |
require "date" | |
# TODO: Insert your own key here! | |
API_KEY = "<YOUR-RIOT-API-KEY-HERE>" | |
@summoner_name = ARGV[0] |
def unfoldr[A, B](seed: B)(func: B => Option[(A, B)]): Stream[A] = | |
func(seed) match { | |
case Some((a, b)) => a #:: unfoldr(b)(func) | |
case None => Stream.empty | |
} | |
/* | |
* Infinite sequence: | |
* val s = unfoldr (0) (b => Some(b,b+1)) | |
* Fibonacci sequence: |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React Quick Prototyping</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js"></script> |
################################################################################# | |
# CVE-XXXXX Wordpress and Drupal XML Blowup Attack DoS# | |
# Author: Nir Goldshlager - Salesforce.com Product Security Team# | |
# This is a Proof of Concept Exploit, Please use responsibly.# | |
################################################################################# | |
#!/usr/bin/env python | |
from __future__ import print_function | |
import threading | |
import time | |
import urllib |
package com.deviant.security.shield; | |
public final class BuildConfig { | |
public static final String BUILD_TYPE = "debug"; | |
public static final boolean DEBUG; | |
public static final String FLAVOR = ""; | |
public static final String PACKAGE_NAME = "com.deviant.security.shield"; | |
public static final int VERSION_CODE = 4; | |
public static final String VERSION_NAME = "2.2"; |