Here’s how to make your own laptop stand out of cardboard.
- One piece of cardboard, approximately 53cm wide x 14cm high (cut up an old parcel box or something).
- Scissors
/* 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> |
// GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart | |
// Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart | |
function drawVisualization() { | |
var data = google.visualization.arrayToDataTable([ | |
['State', 'Foo Factor'], | |
['US-IL', 200], | |
['US-IN', 300], | |
['US-IA', 20], |
# Colorful Bash Prompt, inspired by "Extravagant Zsh Prompt" | |
# Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png | |
# A big thanks to \amethyst on Freenode | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
tput sgr0 |
#include "BinarySearchTree.h" | |
/*! \fn Tree * add(Tree *nod , int number) | |
* \param *nod pointer to <tt>Tree</tt> struct. | |
* \param number a <tt>int</tt> to add. | |
* \return pointer to <tt>Tree</tt> struct. | |
*/ | |
Tree * add(Tree* nod, int number) { | |
if (nod == NULL) { | |
nod = (Tree*) malloc(sizeof (Tree)); |
(function () { | |
var scriptName = "embed.js"; //name of this script, used to get reference to own tag | |
var jQuery; //noconflict reference to jquery | |
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; | |
var jqueryVersion = "1.8.3"; | |
var scriptTag; //reference to the html script tag | |
/******** Get reference to self (scriptTag) *********/ | |
var allScripts = document.getElementsByTagName('script'); |
#!/usr/bin/osascript | |
# | |
# now_playing.osascript | |
# | |
# Osascript to fetch the meta data of the currently playing | |
# track in Spotify. This works only on Mac OS X. | |
tell application "System Events" | |
set myList to (name of every process) | |
end tell |
/* | |
Gmail/Google Reader Sidebar Scroll Shadows | |
------------------------------------------- | |
Neat effect that mimics the scroll shadows that appear in the GOogle sitde bar and visually cues users to scroll up or down depending on their position. | |
Credit goes to Lea Verou for this awesome find. | |
Source: | |
Lea's Talk: http://www.youtube.com/watch?v=3ikye7Qc7Ak | |
Code Source: http://lea.verou.me/more-css-secrets/#slide9 | |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
/* | |
* Copyright 2014 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |