Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View typable's full-sized avatar
🛠️
building stuff

Andreas typable

🛠️
building stuff
View GitHub Profile
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@Fusl
Fusl / gist:3a708b8c32c9d5264fa0
Last active April 20, 2024 22:35
Streaming audio output from Linux (Pulseaudio) to Windows
# Windows (receiver) side:
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1
# Linux (transmitter) side:
pactl load-module module-null-sink sink_name=remote
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181"
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device.
@squarism
squarism / iterm2.md
Last active April 19, 2024 16:26
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@callumlocke
callumlocke / scale-canvas.ts
Last active April 12, 2024 03:25
How to fix a canvas so it will look good on retina/high-DPI screens.
/*
UPDATED for 2023 - Now much simpler. The old tricks are no longer needed.
The following code makes an 800×600 canvas that is always as sharp as possible for the device.
You still draw on it as if it's the logical size (800×600 in this case), but everything just
looks sharper on high-DPI screens. Regular non-sharp screens are not affected.
*/
const width = 800
@roachhd
roachhd / README.md
Last active April 21, 2024 19:28
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@pbojinov
pbojinov / README.md
Last active December 8, 2023 21:09
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@synox
synox / install SonarQube on Raspberry Pi
Last active October 4, 2022 12:06
How to install SonarQube on Raspberry PI
SonarQube does currently not support Raspberry PI.
This is a workaround. It compiles a armv6 compatible version of the java-wrapper and configures sonarqube to use it.
(Testet with Raspbian, wheezy, 3.6)
Compile java-wrapper for ARMv6
============================
Download latest version of " wrapper_prerelease_XY.tar" from http://wrapper.tanukisoftware.com/downloads/ (for me 3.5.17 works)
@hrpunio
hrpunio / tcx2gpx
Created July 24, 2013 09:46
Convert TCX (Garmin Edge) to GPX with gpsbabel
#!/bin/bash
# Convert TCX (Garmin Edge) to GPX with gpsbabel
# Usage: tcx2gpx tcx-file-name [-o gpx-file-name] -max 999
# -o -- gpx-file-name, if not given, computed from tcx-file-name (it is assumed YYYY-MM-DD*.tcx)
# -max -- produce simplified track with maximum 999 trkpoints
#
SIMPLIFY=""
if [ $# -eq 0 ]; then
@crazybyte
crazybyte / encrypt_openssl.txt
Created November 25, 2012 10:10
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.
@surtic86
surtic86 / minecraft
Created April 4, 2011 06:41
Minecraft Start / Stop / Update .... Script
#!/bin/bash
# /etc/init.d/minecraft
# Parameter
USERNAME='bukkit'
MCPATH='/opt/minecraft/'
BACKUPPATH='/opt/backup/'
RAM='1G'
FILENAME='craftbukkit-0.0.1-SNAPSHOT.jar'
START="java -Xincgc -Xmx$RAM -jar $FILENAME"