Skip to content

Instantly share code, notes, and snippets.

View pepe's full-sized avatar

Josef Pospíšil pepe

View GitHub Profile
@pepasflo
pepasflo / .gitignore
Last active October 22, 2023 12:06
Scripts for encrypting / decrypting secrets (to prevent them from being accidentally checked into git)
secrets/
@xjones
xjones / TransitionController.h
Created November 26, 2011 03:48
TransitionController for animating iOS view controller transitions w/o a controller stack
//
// TransitionController.h
//
// Created by XJones on 11/25/11.
//
#import <UIKit/UIKit.h>
@interface TransitionController : UIViewController
@jimweirich
jimweirich / froth.rb
Created February 22, 2012 23:24
Stupid Simple Forth System in Ruby
# Example Usage: ruby froth.rb ": sq dup * ; 2 sq ."
class Froth
attr_reader :storage
attr_accessor :trace
WordDefinition = Struct.new(:name, :xt, :immediate)
class WordDefinition
def immediate?
immediate
class ArrayImpl<T> {
var space: Int
var count: Int
var ptr: UnsafeMutablePointer<T>
init(count: Int = 0, ptr: UnsafeMutablePointer<T> = nil) {
self.count = count
self.space = count
@iperelivskiy
iperelivskiy / hash.js
Created November 19, 2012 14:39
JS simple hash function
var hash = function(s) {
/* Simple hash function. */
var a = 1, c = 0, h, o;
if (s) {
a = 0;
/*jshint plusplus:false bitwise:false*/
for (h = s.length - 1; h >= 0; h--) {
o = s.charCodeAt(h);
a = (a<<6&268435455) + o + (o<<14);
c = a & 266338304;
@sogaiu
sogaiu / what-people-have-used-janet-for.md
Last active March 8, 2023 10:09
some things people have used janet for

pp:

From scripts to quite complex webapps

Ian Henry:

Personally, making games using Jaylib, and compiling to WebAssembly to make websites with embedded scripting. Otherwise, yeah, mostly as a replacement for bash/perl/Python -- https://github.com/andrewchambers/janet-sh makes it strictly better than bash I think.

https://bauble.studio/ and https://toodle.studio/ -- little art playgrounds. I've also written some about my experience making a game in Jaylib here: https://ianthehenry.com/posts/janet-game/

@sogaiu
sogaiu / some-users-of-janet-abstract-type.md
Last active December 18, 2022 17:17
some users of janet abstract type
@bahamas10
bahamas10 / README.md
Last active November 22, 2022 00:26
Void Linux on Raspberry Pi 4

Summary

I'm able to get a Void Linux image (32bit, raspberry pi 2 image) to boot on the raspberry pi 4. Currently, I can get it to boot and even handle upgrading via xbps-install -Su (networked over ethernet), however I can't seem to get it to see the internal wlan (wifi) device.

huge shout out to kodifies on this reddit post for helping me to get this going.

@sogaiu
sogaiu / peg-exercises.janet
Last active November 11, 2022 00:27
janet peg exercises
# find * and + to be confusing, trying to use sequence and choice instead
(def peg-simple
~{:main (capture (some :S))})
(peg/match peg-simple "hello") # => @["hello"]
# from:
# https://janet-lang.org/docs/peg.html
(defn finder
@elithrade
elithrade / vimfiler-shortcuts
Last active October 12, 2022 21:13
Common vimfiler keyboard shortcuts
Toggle safe mode: gs
Create new file: N
Delete file: d
Rename file: r
New directory: K
Open file: e
Move file: m
Open VimFilerExplorer: e
Open current directory in a new buffer: dl
Open current directory in a new split: ds