Skip to content

Instantly share code, notes, and snippets.

View tomschlick's full-sized avatar

Tom Schlick tomschlick

View GitHub Profile
@skywinder
skywinder / idea_native_clipboard_support
Last active August 29, 2015 14:15
idea_native_clipboard_support - for quickly fix idea.properties file
#!/usr/bin/env bash
if [ -n "$1" ]
then
if grep "ide.mac.useNativeClipboard=" "$1"/Contents/bin/idea.properties > /dev/null
then
if grep "ide.mac.useNativeClipboard=false" "$1"/Contents/bin/idea.properties > /dev/null
then
echo "ide.mac.useNativeClipboard=false found -> change to true"
@coderanger
coderanger / README.md
Last active August 18, 2023 18:33
How to patch Ubuntu for Heartbleed

How to patch Ubuntu for Heartbleed

  1. sudo apt-get update
  2. sudo apt-get install -y libssl1.0.0 openssl
  3. openssl version -a and confirm the "built on" date is >= 2014-04-07
  4. sudo lsof -n | grep ssl | grep DEL and restart all listed services.

Repeat #4 until no results are returned.

@nerrad
nerrad / hipchatcurl.pl
Created February 5, 2014 14:49
Curl string for pinging HipChat server. Event Espresso (one of my clients) is trying out the hipchat.com service and they have a really cool api for sending notifications/messages to the chat rooms. So I wired up our git deploy repo on our server to notify the chatrooms whenever we deploy. Here's the one liner script I added.
curl --data "room_id=99999" --data "from=EEWebsiteBot" --data-urlencode "message=Event Espresso staging servers (beta and dev) have been deployed to" --data "message_format=text" --data "notify=1" --data "color=purple" https://api.hipchat.com/v1/rooms/message?auth_token=obsfucated_api_token
##So the room_id corresponds to what room you want the notifications go to and the auth token is the api key you generate via the group admin in HipChat (web).
@joshearl
joshearl / PHP.sublime-settings
Created July 13, 2013 19:44
To enable double-clicking to select PHP variables (including the `$` prefix), save this file as `Data/Packages/User/PHP.sublime-settings`.
{
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
@RogWilco
RogWilco / kextload.virtualbox.sh
Created June 21, 2013 18:39
Loads the required OS X kernel extensions for VirtualBox. This is specifically useful in the developer preview of OS X 10.9 Mavericks, which for some reason does not seem to automatically load these kernel extensions (which, consequently, will prevent most VMs from successfully booting). Use launchd to have this script run on boot to ensure they…
#!/bin/bash
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxDrv.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetFlt.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetAdp.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxUSB.kext"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@philsturgeon
philsturgeon / default.rb
Created January 8, 2013 18:02
Get PHP 5.4 in Ubuntu 12.04 (or just upgrade to 12.10)
# Use PHP 5.4
apt_repository "php54" do
uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
distribution node['lsb']['codename']
components ["main"]
keyserver "keyserver.ubuntu.com"
key "E5267A6C"
end
@bradmontgomery
bradmontgomery / sshserver.rb
Created October 25, 2012 18:28
Chef role that sets up sshd with an enabled SFTP subsystem. I use `upload_project` in fabric, and after moving to a Chef-based system I started getting `ssh.SSHException: Channel closed` errors.
name "sshserver"
description "Configures SSH and enables SFTP"
run_list(
"recipe[openssl::default]",
"recipe[openssh]",
)
default_attributes(
"openssh" => {
"server" => {
"subsystem" => "sftp /usr/lib/openssh/sftp-server" # path for Ubuntu; ymmv
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@tcz
tcz / gist:1746180
Created February 5, 2012 15:50
MySQL backup with innobackupex and s3cmd
#!/bin/bash
INNOBACKUP="/root/percona-xtrabackup/innobackupex"
INNOBACKUP_OPTIONS="--defaults-file=/etc/my.cnf --ibbackup=/root/percona-xtrabackup/mysql-5.5/storage/innobase/xtrabackup/xtrabackup_innodb55 --parallel=4 --user=root --password=XXXXXXX"
BACKUPDIR="/var/sqlbackup/"
S3BUCKET="db_backup"
echo "Removing old local backups"
cd $BACKUPDIR