Skip to content

Instantly share code, notes, and snippets.

View wopian's full-sized avatar
🦑

James Harris wopian

🦑
View GitHub Profile
% !TeX root = ../index.tex
\chapter{Syntax}
\graphicspath{{2-syntax/images/}}
\section{Exercise 1}
\url{https://intweb.bucks.ac.uk/~21606555/oos/2-syntax/ex1.php}
\captionsetup{type=figure}\captionof{figure}{ex1.php}
\subfile{pyg/src/2-syntax/ex1}
@wopian
wopian / gifToWebm.sh
Created November 22, 2017 08:50
GIF to Webm
if shopt -q globstar
then
IFS=$'\n'
for file in $(find -name '*.gif')
do
printf "%16s Converting to webm >> $file\n" $SECONDS &&
ffmpeg -loglevel panic -i "$file" -c:v libvpx -crf 10 -an -b:v 10M -y "${file%.gif}.webm" &&
if [ -f "${file%.gif}.webm" ]
then
printf "%16s Deleting gif >> $file\n" $SECONDS
function pivot (array) {
let total = array.reduce((accumulator, value) => accumulator + value, 0)
let left = 0
// Iterate over each item in array
for (let i = 0; i < array.length; i++) {
// Subtract its value from the total
total -= array[i]
// If current total is equal to the left total, then
// we've hit the index we need, returns the index
@wopian
wopian / Hummingbird Summer 2016 TV
Last active October 23, 2016 21:30
Hummingbird Summer 2016 TV
We couldn’t find that file to show.
from time import sleep
import time
import sys
import random
from random import uniform
from array import array
# MAGIC 8 Welcome
answer = [
1 Panty & Stocking with Garterbelt
2 FLCL
3 Gate: Thus the JSDF Fought There!
4 Cowboy Bebop
5 Daily Lives of High School Boys
6 Little Witch Academia
7 Love Live!
8 Tsukimonogatari
9 Working!!
10 One-Punch Man
http://method.ac/
http://bl.ocks.org/mbostock
https://github.com/mbostock/d3
@wopian
wopian / SassMeister-input-HTML.html
Created December 6, 2014 22:23
Generated by SassMeister.com.
<!DOCTYPE html>
<html>
<head>
<title>Love Live Cards</title>
<link href='https://fonts.googleapis.com/css?family=Sansita+One|Nunito:400,300,700' rel='stylesheet' type='text/css'>
</head>
<canvas id="snow"></canvas>
@wopian
wopian / SassMeister-input-HTML.html
Created December 6, 2014 02:21
Generated by SassMeister.com.
<!DOCTYPE html>
<html>
<head>
<title>Wopian</title>
<link href='//fonts.googleapis.com/css?family=Quicksand:300,400,700' rel='stylesheet' type='text/css'>
<link href="/assets/css/main.css" rel="stylesheet">
</head>
<body id="skrollr-body">