Skip to content

Instantly share code, notes, and snippets.

@jdivock
jdivock / cheatin.js
Last active September 6, 2016 03:39
Cheatin at cookie clicker
const autoClickBig = () => {
const bigCookie = $('#bigCookie');
const bigClickInterval = setInterval(() => bigCookie.click(), 0);
}
// Vanilla auto-click golden
setInterval(() => {
const $shimmer = document.querySelector('div.shimmer');
$shimmer && $shimmer.click();
}, 1000)
@jdivock
jdivock / graphSnips.js
Last active October 2, 2015 20:57
graphql snippets
fragment JayFragment on Account {
email,
id
}
query UseFragment {
jay: account(id: 1) {
...JayFragment
}
}
// This doesn't work like you might think, because the value of `i` never
// gets locked in. Instead, every link, when clicked (well after the loop
// has finished executing), alerts the total number of elements, because
// that's what the value of `i` actually is at that point.
var elems = document.getElementsByTagName( 'a' );
for ( var i = 0; i < elems.length; i++ ) {
elems[ i ].addEventListener( 'click', function(e){
@jdivock
jdivock / 3colflexbox.html
Created August 9, 2015 21:21
3col flexbox
<html>
<head>
<style>
header {
height: 30px;
background: red;
}
article {
margin-left: 150px;
@jdivock
jdivock / 3colBasic.html
Created August 9, 2015 21:04
3Col CSS basic
<html>
<head>
<style>
header {
height: 30px;
background: red;
}
article {
margin-left: 150px;
@jdivock
jdivock / test.org
Last active August 29, 2015 14:22
test.org

evil-org-mode

Supplemental evil-mode key-bindings to Emacs org-mode. This is a work in progress, expect improvements and don’t be afraid to contribute patches.

Requirements

  • org-mode, git://repo.or.cz/org-mode.git
  • evil-mode, git://gitorious.org/evil/evil.git
  • evil-leader, git://github.com/cofi/evil-leader.git
@jdivock
jdivock / JSConf2015.org
Last active August 29, 2015 14:22
JSConf 2015

JSConf 2015

Day 1

Keynote

Oh, not a keynote, simple overview

Felipe de Albuquerque Accessibility and JS: side-by-side

Talk not in english

Trying new things!

this is weird

@jdivock
jdivock / tea-async-test.clj
Created February 1, 2015 01:51
clojure async channels
(ns async-tea-party.core
(:require [clojure.core.async :as async])
)
(def tea-channel (async/chan 10))
(async/>!! tea-channel :cup-of-tea)
(async/<!! tea-channel)
@jdivock
jdivock / clojure-ch4.clj
Created January 31, 2015 21:46
protocols and such
;; Anything you type in here will be executed
;; immediately with the results shown on the
;; right.
(import 'java.util.UUID)
(UUID/randomUUID)
(defn who-are-you [input]
(cond
@jdivock
jdivock / .vimrc
Last active August 29, 2015 14:13
.vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'glidenote/newdayone.vim'