| Assignment | |
|---|---|
Assign value to variable if variable is not already set, value is returned.Combine with a : no-op to discard/ignore return value. |
${variable="value"}: ${variable="value"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/fontforge | |
| # Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc | |
| fonts = FontsInFile($1) | |
| n = SizeOf(fonts) | |
| i = 0 | |
| while (i < n) | |
| Open($1 + "(" + fonts[i] + ")", 1) | |
| index = ToString(i + 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -eux | |
| # Extracts and load PSX games that are distributed in .7z / .ape format. | |
| # Requires : ffmpeg, perl, cdemu, ecm2bin | |
| GAME_FOLDER="$1" | |
| EXTRACT_FOLDER=/tmp/game | |
| rm -rf "$EXTRACT_FOLDER" | |
| mkdir "$EXTRACT_FOLDER" | |
| cp -rf "$GAME_FOLDER"/* "$EXTRACT_FOLDER" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Step 1: Install the following 3rd party prerequisites, you can get these from macports: | |
| # | |
| # sudo port install libpng | |
| # sudo port install libsdl_ttf | |
| # sudo port install libsdl_mixer | |
| # | |
| # Step 2: Download and unzip Vulture Nethack source from http://www.darkarts.co.za/vulture-for-nethack | |
| # | |
| # Step 3: Place this file at the base of the unzipped vulture nethack source directory, and run it: | |
| # sh vulture-nethack-mac-build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local lpeg = require 'lpeg' | |
| local L = lpeg.locale() | |
| local P,V,C,Ct,S,R,Cg,Cc = | |
| lpeg.P, lpeg.V, lpeg.C, lpeg.Ct, lpeg.S, lpeg.R, lpeg.Cg, lpeg.Cc | |
| local ws = S'\r\n\f\t\v ' | |
| local ws0 = ws^0 | |
| local ws1 = ws^1 | |
| local name = S'_ ' + L.digit + L.alpha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %.hex: %.asm | |
| avra -fI $< | |
| rm *.eep.hex *.obj *.cof | |
| all: $(patsubst %.asm,%.hex,$(wildcard *.asm)) | |
| upload: ${program}.hex | |
| avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$< | |
| monitor: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <style> | |
| html, body{ | |
| width:100%; | |
| height:100%; | |
| } | |
| svg { | |
| width: 960px; | |
| height:500px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <dlfcn.h> | |
| int main(int argc, char** argv) | |
| { | |
| void *handle; | |
| void (*func_print_name)(const char*); |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js