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:
/* Compile with: g++ -Wall –Werror -o shell shell.c */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> |
/** | |
* Created with IntelliJ IDEA. | |
* User: Gong Li | |
* Date: 5/26/13 | |
* Time: 12:23 PM | |
* Implement a priority queue using a heap | |
* The heap is implemented using an array indexed from 1 | |
*/ | |
public class PriorityQueueUsingHeap<T extends Comparable<T>> { | |
T[] arr; |
//Install Macports. | |
//Install aircrack-ng: | |
sudo port install aircrack-ng | |
//Install the latest Xcode, with the Command Line Tools. | |
//Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
//Figure out which channel you need to sniff: | |
sudo airport -s | |
sudo airport en1 sniff [CHANNEL] |
/* Queue - Circular Array implementation in C++*/ | |
#include<iostream> | |
using namespace std; | |
#define MAX_SIZE 101 //maximum size of the array that will store Queue. | |
// Creating a class named Queue. | |
class Queue | |
{ | |
private: | |
int A[MAX_SIZE]; |
Install on OS X: sudo gem install sass
Version info: sass -v
def merge(lhs, rhs): | |
lhs, rhs = lhs[:], rhs[:] | |
merged_list = [] | |
while bool(lhs) and bool(rhs): | |
if lhs[0] <= rhs[0]: | |
merged_list.append(lhs.pop(0)) | |
else: | |
merged_list.append(rhs.pop(0)) | |
return merged_list + lhs + rhs |
Forked from Daniel Williams's Pen React JS Weather App.
Forked from Daniel Williams's Pen React JS Weather App.
Forked from Daniel Williams's Pen React JS Weather App.
package src.LinkedList; | |
public class LinkedList { | |
public Node head; | |
public int listCount; | |
public LinkedList(){ | |
head = new Node(0); | |
listCount = 0; | |
} |