Skip to content

Instantly share code, notes, and snippets.

View zeroeth's full-sized avatar
🤖
🐱 🤖 🐱 🤖

[0] zeroeth

🤖
🐱 🤖 🐱 🤖
View GitHub Profile
@Pirolf
Pirolf / md
Created August 17, 2015 17:49
zerolfu
Importance: Arrays > Lists > Hash > Trees
*Arrays
1. find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum
http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
2. find a triplet in an array that sum-to a given value http://www.geeksforgeeks.org/find-a-triplet-that-sum-to-a-given-value/
3. Find minimum number of coins that make a given value http://www.geeksforgeeks.org/find-minimum-number-of-coins-that-make-a-change/
*List
@bjodah
bjodah / .gitignore
Last active September 15, 2023 18:50
count byte freqencies
a.out
zeros.bin
output.txt
@nylki
nylki / char-rnn recipes.md
Last active August 1, 2026 05:16
char-rnn cooking recipes

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@anj1
anj1 / lazysort.jl
Last active November 19, 2015 09:06
# Lazy quicksort.
# Can be used to take only the first k elements of the sorted array,
# And will do this 'efficiently'
lazysort{T}(lst::Vector{T}) =
@task begin
if length(lst) == 0 # is sorting trivial?
elseif length(lst) == 1
produce(lst[1])
else
# take pivot element
#include <Adafruit_NeoPixel.h>
#define PIN 2
#define Pixels 24
#define BG 1
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
@saitoha
saitoha / Makefile
Last active January 16, 2023 13:16
SIXEL color graphics DEMO (xterm pl#301 and gnuplot)
#
# SIXEL color graphics DEMO
#
# xterm pl#301 with --enable-sixel-graphics option
# gnuplot with --with-bitmap-terminals option
#
# Now the color palette of xterm VT-340 mode is limited to 16.
# If you want to change it to 256, apply the following patch.
# https://gist.github.com/saitoha/7822989/raw/20727b88f0f826bfcb9d644907944b29a456b67f/graphics.c.diff
#
@XVilka
XVilka / TrueColour.md
Last active July 13, 2026 20:43
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@zeroeth
zeroeth / git-branch-status.sh
Last active December 31, 2015 16:19
git branch distance status
#!/bin/bash
# modified by http://github.com/zeroeth for color/alignment
# modified by http://github.com/kortina
# original from http://github.com/jehiah
# this prints out branch ahead/behind status vs origin/master for all branches
# example:
# $ git-branch-status
# dns_check (ahead 1) | (behind 112) origin/master
# master (ahead 2) | (behind 0) origin/master
@zeroeth
zeroeth / existing_remote_branches.sh
Last active December 31, 2015 13:29
git client svn workflows
# Only needed once, rather slow. checkout the project url without /trunk on the end.
# -b needs test/branches because a non-standard layout in the repo I'm working with.
#
git svn clone https://<repo url> -T trunk -b test/branches -t tags <local folder name>
# Mirror the svn ignore into your local git (Does not require checking in any git related files)
# can take a few minutes, make sure you are in the project folder first.
#
git svn show-ignore >> .git/info/exclude
anonymous
anonymous / vundles.vim
Created December 10, 2013 19:32
" ========================================
" Vim plugin configuration
" ========================================
"
" This file contains the list of plugin installed using vundle plugin manager.
" Once you've updated the list of plugin, you can run vundle update by issuing
" the command :BundleInstall from within vim or directly invoking it from the
" command line with the following syntax:
" vim --noplugin -u vim/vundles.vim -N "+set hidden" "+syntax on" +BundleClean! +BundleInstall +qall
" Filetype off is required by vundle