Skip to content

Instantly share code, notes, and snippets.

<?php
// Nav Menu Dropdown Class
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' );
/**
* Mobile Menu
*
*/
function be_mobile_menu() {
@jeroenbegyn
jeroenbegyn / README.md
Last active September 11, 2021 19:28
Twitter Search with API v1.1

Description

Simple Dashing widget (and associated job) to display a Twitter search. Uses Twitter API v1.1.

##Dependencies

twitter

Add it to dashing's gemfile:

@willjohnson
willjohnson / README.md
Last active April 26, 2022 19:32
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage

@ftrain
ftrain / rhymes.clj
Last active July 14, 2023 22:20
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.
# This script assumes a dump of images from the Everyday iOS app.
# It distributes all images from images/ into N subdirectories,
# starting with 1 and proceeding to N.
# the intention is to load these images into a video editor
# to make a variant of Kalina's videos that shows multiple
# images at once.
require 'FileUtils'
print "Looking for images in folder 'images'... "
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 16:42
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@jstepien
jstepien / Cargo.toml
Last active December 1, 2019 10:15
It All Looks the Same to Me
[package]
name = "bk"
version = "0.1.0"
authors = ["Jan Stępień"]
@beesandbombs
beesandbombs / squareZoom.pde
Created October 16, 2018 18:17
square zoom
// zooming squares. by dave
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@scottrigby
scottrigby / spin.sh
Created April 1, 2019 01:50
Shell script to begin or end a spinner background process
#!/bin/sh
help() {
cat << EOF
spin(1)
NAME
spin - begin or end a spinner background process
SYNOPSIS