Skip to content

Instantly share code, notes, and snippets.

@yeldarby
yeldarby / index.html
Created April 5, 2014 16:20
Firebase Web Counter
<html>
<head>
<script type='text/javascript' src='https://cdn.firebase.com/js/client/1.0.11/firebase.js'></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
$(function() {
var ref = new Firebase('https://cyhack.firebaseio.com');
var counter = ref.child('cyhack2');
@yeldarby
yeldarby / SKNode.extension.swift
Created December 27, 2017 22:02
SpriteKit Recursive childNode withName
/*
Copyright (c) 2017 Brad Dwyer. All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, see <https://opensource.org/licenses/MIT>.
SceneKit contains a recursive search for childNodes but SpriteKit inexplicably doesn't.
So here's an extension that adds one, enjoy.
*/
@yeldarby
yeldarby / dist-imdb.py
Last active April 6, 2019 00:58
Fastai Distributed Language Model
from fastai import *
from fastai.text import *
from fastai.distributed import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--local_rank", type=int)
args = parser.parse_args()
torch.cuda.set_device(args.local_rank)
torch.distributed.init_process_group(backend='nccl', init_method='env://')
@yeldarby
yeldarby / ContentView.swift
Created June 20, 2019 16:30
SwiftUI Challenge
/**********
YOUR CHALLENGE, SHOULD YOU CHOOSE TO ACCEPT IT:
Modify the code below to work with a list
of arbitrary size *without* preallocating a
fixed-length array.
REPLY @braddwyer ON TWITTER WITH YOUR SOLUTION HERE:
https://twitter.com/braddwyer/status/1141744658399334401
(Original challenge via @JadenGeller, https://twitter.com/JadenGeller/status/1141300214654881792 )