Skip to content

Instantly share code, notes, and snippets.

View DominikBucher12's full-sized avatar
🚀
#YOLO

Dominik Bucher DominikBucher12

🚀
#YOLO
View GitHub Profile
@erbmicha
erbmicha / compile_xibs
Created May 27, 2012 04:08
Compile XIB files into NIB files for RubyMotion projects
#!/bin/bash
XIBS="*.xib
app/*.xib
interfaces/*.xib
resources/*.xib"
for i in $XIBS
do
echo "Compiling `basename $i`..."
ibtool --compile resources/`basename -s .xib $i`.nib $i
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@jpalumickas
jpalumickas / osascript.rb
Last active July 1, 2021 11:36
osaScript Ruby examples
# === Terminal.app === #
# Open new tab in terminal.
exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ")
# Open directory
exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ")
# Open directory in new tab (this is better)
exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&1")
@sloria
sloria / bobp-python.md
Last active May 12, 2024 06:54
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@johndrinkwater
johndrinkwater / dualshock-research
Last active March 16, 2024 15:12
I’m interested in writing (or helping to spec out the protocol so someone else can write) the linux kernel driver for Sony’s DualShock 4 (PS4’s lovely controller) Currently using the output of HID RAW from a USB connected dualshock 4… For the gyro/touchpad discovery, I’ve just been using some terrible c code to throw numbers on the screen and it…
TADA, it’s `hexdump -v -e '64/1 "%02x" "\n"' < /dev/hidraw3`
No idea what the first byte is… but I’m going to assume its for device ID for the many users that are connected, but it probably has to be set by the connected machine?
01ff777f7f0800aa0000435dfdf1ff14000200c5ff0721150300000000001b000001fc9133a32990880428008000000080000000008000000080000000008000
↑↑↑↑
left stick, value, first field is horz (00 left), second field is vertical (00 top)
017f80ff61080064000059f2fdfffffbff0e00d107081e9bf600000000001b0000018e94b1b00690880428008000000080000000008000000080000000008000
↑↑↑↑
@vratiu
vratiu / .bash_aliases
Last active May 20, 2024 21:01
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@squishykid
squishykid / uikit-apple-watch.md
Last active February 13, 2024 23:43 — forked from elliottsj/uikit-apple-watch.md
My attempt at getting UIKit to work on watchOS 2

Update: UIKit works!! More complete post & info incoming, after http://hackthenorth.com/ (where I am now) is over.

img_0016


Attempting to get React Native to work on watchOS 2, starting with trying to get just UIKit working like @steventroughtonsmith: http://blog.steventroughtonsmith.com/post/128957959685/native-uikit-apps-on-apple-watch

The 'ActualWatchApp' framework target is linked to React Native headers via Cocoapods; currently just trying to get the 'PlainWatchApp' framework target (which isn't linked to React Native) working.

@tofuseng
tofuseng / wifikill.py
Created December 18, 2015 07:56
A python program to kick people off of wifi
#!/usr/bin/env python
###############################################################################
# Wifi Kill #
# Robert Glew #
# https://github.com/roglew/wifikill #
# This python script can be used to kick anyone or everyone off of your wifi #
# network. The script must be run as sudo in order to send the required #
# packets. Have fun. #
###############################################################################
@iandundas
iandundas / String+emoji.swift
Last active April 23, 2022 16:30
Random Emoji
// Returns a random Emoji 🌿
extension String{
func randomEmoji()->String{
let range = 0x1F601...0x1F64F
let ascii = range.startIndex + Int(arc4random_uniform(UInt32(range.count)))
let emoji = String(UnicodeScalar(ascii))
return emoji
}
}
@subfuzion
subfuzion / curl.md
Last active May 16, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.