Skip to content

Instantly share code, notes, and snippets.

View olivoil's full-sized avatar

Olivier Melcher olivoil

View GitHub Profile
@trshafer
trshafer / facebook-stub.html
Created February 15, 2011 04:50
A js stub for the facebook javascript sdk
<html>
<head>
<script type="text/javascript" charset="utf-8">
var FB = function(){
//defaults and accessors
var initialized = false,
loggedIn = null,
shouldSucceed = true,
uid = '12345';
@tomdale
tomdale / gist:1856842
Created February 18, 2012 01:54
Ember documentation TODO

Documentation

TODO

  • API docs
  • How to bootstrap a project
  • Application structure (M/V/C layers and what they're for)
  • Getting started with Ember and Rails
  • Built-in controls
  • How events are handled and bubbled

Routing in Ember

In Ember, the application's state manager handles routing. Let's take a look at a simple example:

App.stateManager = Ember.StateManager.create({
  start: Ember.State.extend({
    index: Ember.State.extend({
      route: "/",
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 21, 2024 01:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@marcandre
marcandre / gist:3422303
Created August 22, 2012 04:39
Fixx buzz battle
# Hi # Hi
# For this interview, we'd like you to
# Write fizz buzz
# Ok:
def go
fizzy = ->(n){ n % 3 == 0 }
buzzy = ->(n){ n % 5 == 0 }
fizzbuzzy = ->(n){ n % 15 == 0 }
@nf
nf / vm-setup.sh
Last active June 14, 2023 22:08
Script for setting up Debian Jessie VM with my development environment
#!/bin/bash -e
echo '
PATH=$HOME/go/bin:$PATH
export GOPATH=$HOME
export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg
export EDITOR=vim
' >> ~/.profile
sudo apt-get update
@lattner
lattner / TaskConcurrencyManifesto.md
Last active June 19, 2024 13:41
Swift Concurrency Manifesto
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active June 18, 2024 16:46
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@adrianhall
adrianhall / AppSync-Example.yaml
Created April 13, 2018 16:01
An example CloudFormation template for AWS AppSync
---
Description: AWSAppSync DynamoDB Example
Resources:
GraphQLApi:
Type: "AWS::AppSync::GraphQLApi"
Properties:
Name: AWSAppSync DynamoDB Example
AuthenticationType: AWS_IAM
PostDynamoDBTableDataSource: