Skip to content

Instantly share code, notes, and snippets.

View moughamir's full-sized avatar
:shipit:
Looking for Missions

Mohamed Moughamir moughamir

:shipit:
Looking for Missions
View GitHub Profile

Play Button

A little test interaction for an upcoming web project. Enjoy the bounce!

A Pen by Luke on CodePen.

License.

@j450h1
j450h1 / index.html
Last active August 29, 2015 14:22
4 Major Sports Leagues in North America
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Comparing North American Major Sports Leagues by Revenue &amp; Attendance</title>
<link href='http://fonts.googleapis.com/css?family=Lora' rel='stylesheet' type='text/css'>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script>
<script type="text/javascript">
function draw(data,filter_year) {
@abada
abada / register_taxonomy.php
Created May 26, 2015 08:32
register_taxonomy
add_action('init', array($this, 'create_stores_nonhierarchical_taxonomy'));
function create_stores_nonhierarchical_taxonomy() {
// Labels part for the GUI
$labels = array(
'name' => _x( 'Store Categories', $this -> textdomain ),
'singular_name' => _x( 'Store Categories', $this -> textdomain ),
'search_items' => __( 'Search Store Categories',$this -> textdomain ),
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active July 4, 2024 05:29
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@danawoodman
danawoodman / pdf.js
Created April 10, 2015 19:41
Example of using pdfkit in Node.js
var fs = require('fs');
var PDFDocument = require('pdfkit');
var pdf = new PDFDocument({
size: 'LEGAL', // See other page sizes here: https://github.com/devongovett/pdfkit/blob/d95b826475dd325fb29ef007a9c1bf7a527e9808/lib/page.coffee#L69
info: {
Title: 'Tile of File Here',
Author: 'Some Author',
}
});
@jason-s
jason-s / hilbertcurve.html
Created December 15, 2014 17:39
Hilbert curve generator using Javascript + SVG
<html>
<head>
<script type="text/javascript">
function createSVG(e)
{
return document.createElementNS("http://www.w3.org/2000/svg",e);
}
function left(v)
{
x = v[0];
@belsrc
belsrc / gist:672b75d1f89a9a5c192c
Last active April 15, 2023 15:13
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
@pommiegranit
pommiegranit / link_pdf_attachment.php
Last active May 31, 2018 08:51
Simple plugin to add a link to the top of a WordPress post to any PDF attachment
@adamrbrown
adamrbrown / bubbles.js
Created May 7, 2014 15:58
Creates floating bubbles on HTML5 Canvas
/**
* Splash bubbles
* Copyright © 85times.com
*/
$(function() {
var canvas = $('#bubbles');
var context = canvas.get(0).getContext("2d");
var bubbles = new Array();
@caasi
caasi / vlc.sh
Created March 20, 2014 07:01
vlc 2.2.0 and YouTube Live
cvlc v4l2:///dev/video0:width=640:height=480 --sout '#transcode{vcodec=h2
64,vb=1000,acodec=aac,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2
/<key>}'