Skip to content

Instantly share code, notes, and snippets.

View neuro-sys's full-sized avatar
💭
💾

Fırat Salgür neuro-sys

💭
💾
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@lordastley
lordastley / gist:5127027
Last active March 1, 2024 09:45
1-bit dithering a video
ffmpeg -i input.mp4 -s hd480 -f image2 img-%4d.png # dump the video to .png images, 480p
for i in *.png; do convert $i -colorspace Rec709Luma pgm:- | pamditherbw -atkinson | pnmtopng > p$i; done; # convert .png images to 1-bit dithered .pngs
ffmpeg -r [orig. framerate] -i pimg-%4d.png -i input.mp4 -map 0:0 -map 1:1 -c:a copy -c:v libx264 -tune stillimage -crf 18 -r 24 lol.mkv
#take dithered png files, original video's audio, make a video with x264, tuned for still images and a copy of the audio. specify frame rate for proper a/v sync
# -map 1:1 maps audio from 2nd input (orig video) to audio of new video. assumes stream 1 is desired audio track. check this.
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@rgngl
rgngl / bfinterp.py
Created October 16, 2013 13:44
Brainfuck interpreter in Python
#Wrote this to entertain myself, on a slow day at work.
#Üstün Ergenoglu
import sys
class Instructions:
SUBP = 0
INCP = 1
DECP = 2
INCV = 3
@jteneycke
jteneycke / gist:7947353
Last active June 20, 2024 12:29
How to install and configure Common Lisp for Emacs. (SBCL + Slime + Emacs24)

In your shell

sudo apt-get install sbcl
curl -O http://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp

Inside the context of sbcl

@tegansnyder
tegansnyder / grab-all-product-attributes.sql
Created January 20, 2014 15:29
Magento grab all product attributes for a SKU in direct SQL. "static" backend_type attributes are stored in catalog_product_entity
SELECT * FROM ( SELECT
ce.sku,
ea.attribute_id,
ea.attribute_code,
CASE ea.backend_type
WHEN 'varchar' THEN ce_varchar.value
WHEN 'int' THEN ce_int.value
WHEN 'text' THEN ce_text.value
WHEN 'decimal' THEN ce_decimal.value
WHEN 'datetime' THEN ce_datetime.value
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@kylemclaren
kylemclaren / findLongRunningOp.js
Last active July 7, 2024 16:56 — forked from comerford/killLongRunningOps.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
@nhagen
nhagen / PromisAllWithFails.js
Last active November 15, 2022 18:11
Wait until all promises have completed even when some reject, with Promise.all
var a = ["sdfdf", "http://oooooolol"],
handleNetErr = function(e) { return e };
Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr))
.then(function(sdf, invalid) {
console.log(sdf, invalid) // [Response, TypeError]
})
.catch(function(err) {
console.log(err);
})