Skip to content

Instantly share code, notes, and snippets.

@statico
statico / gist:3172711
Created July 24, 2012 21:15
How to use a PS3 controller on Mac OS X 10.7 (Lion)

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@nickrw
nickrw / volsay.sh
Created April 19, 2013 12:43
volsay: Wrapper around OSX's `say' command, which sets the system volume to the requested level, then restores volume / mute state once speech is complete.
#!/bin/bash
function usage() {
echo "usage: $0 <volume (0-100)> <say args...>"
echo
echo "Unmutes and sets the system volume to volume%, passing the remaining"
echo "arguments to the OSX \`say' command, restoring volume / mute setting"
echo "to previous values after the speech has completed."
exit 1
}
@QiMa
QiMa / centos_python_env_setup
Last active May 24, 2016 08:50 — forked from floer32/centos_python_env_setup
CentOS, Python3, virtualenv, django-cms , gunicorn
#!/bin/bash
cd /tmp
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar xf Python-3.3.0.tar.bz2
mv Python-3.3.0 /usr/local/
cd /usr/local/Python-3.3.0
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@orangkucing
orangkucing / GoPro-HerobusPinout.md
Last active January 15, 2023 05:01
Herobus pinout of GoPro Hero 3+ Black
pin I/O label description remark
1 - GND ground
2 I/O I2CSCL I²C clock (pulled up by camera)
3 I/O I2CSDA I²C data (pulled up by camera)
4 - GND ground
5 I BATTIN battery input
6 I BATTIN battery input
7 O 3V8OUT unregulated power out 3.8V 0V when camera is off.
8 O 3V8STBY unregulated power out 3.8V always keep 3.8V unless battery is out.
diff --git a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml
index dbdae03..702d0ba 100644
--- a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml
+++ b/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml
@@ -22,7 +22,7 @@
<changeSet id="00000000000001" author="jhipster">
<createSequence sequenceName="SEQ_USER" startValue="1000" incrementBy="1"/>
<createTable tableName="JHI_USER">
- <column name="id" type="bigint" autoIncrement="${autoIncrement}" defaultValueComputed="SEQ_USER.NEXTVAL">
+ <column name="id" type="bigint" autoIncrement="${autoIncrement}">
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active March 24, 2024 14:35
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
import requests
from requests.auth import HTTPBasicAuth
import re
from StringIO import StringIO
JIRA_URL = 'https://your-jira-url.tld/'
JIRA_ACCOUNT = ('jira-username', 'jira-password')
# the JIRA project ID (short)
JIRA_PROJECT = 'PRO'
GITLAB_URL = 'http://your-gitlab-url.tld/'
@aiguofer
aiguofer / README.md
Last active April 27, 2023 19:12
Get info about running jupyter notebooks including memory consumption, how long they've been running, etc.
@bdpwebdesign
bdpwebdesign / key_mapping.md
Last active July 14, 2024 11:27
Apple Magic Keyboard mapping for Linux Mint

Map an Apple Magic Keyboard to a Linux machine

Configured for a Mac-like experience

Apple Magic Keyboard 2: Model A1644 (same as MLA22LL/A ?)

Mapping for Linux Mint 18 Cinnamon 64-bit

xmodmap source