Skip to content

Instantly share code, notes, and snippets.

@wacko
wacko / gist:5577187
Last active July 13, 2024 00:48
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@sheldonh
sheldonh / local_wait.yml
Last active July 27, 2023 21:02
Wait for SSH to come up in an Ansible playbook
---
- hosts: demo
tags: wait
gather_facts: no
tasks:
- name: Wait for SSH
local_action: wait_for port=22 host={% if ansible_ssh_host is defined %}{{ ansible_ssh_host }}{% else %}{{ inventory_hostname }}{% endif %}
@EvanK
EvanK / nope.xml
Created November 19, 2013 22:45
Pro tip: PHPUnit's test suite "exclude" nodes don't do wildcard expansion. Took me longer than I'd like to admit figuring this out.
<phpunit>
<testsuites>
<testsuite name="Unit">
<directory>../src/*/Bundle/*Bundle/Tests</directory>
<exclude>src/*/Bundle/*Bundle/Tests/Functional</exclude>
</testsuite>
</phpunit>
@handrus
handrus / gist:8835872
Created February 5, 2014 23:59
Faster git clone for large repositories
git clone --depth 1 https://github.com/CocoaPods/Specs
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active September 24, 2024 14:47
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@vratiu
vratiu / .bash_aliases
Last active April 15, 2025 15:05
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
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@tommyvdv
tommyvdv / feature-ckeditor-no-dimension-styles-inline.patch
Last active August 29, 2015 14:12
Forkcms fix: Unminified version of image plugin. The backend ckeditor no longer suggests image width and height automatically when inserting an image. Additionally the inline-styles for the set width and height are replaced by element attributes.
From bcb9a6feb17294e86692a08afcaeaab50196efd3 Mon Sep 17 00:00:00 2001
From: Tommy Van de Velde <[email protected]>
Date: Fri, 23 Jan 2015 09:24:35 +0100
Subject: [PATCH] no more auto-sizes or inline styles upon inserting an image
in an editor
---
src/Backend/Core/Js/backend.js | 48 +-
.../Js/ckeditor/plugins/image/dialogs/image.js | 1424 +++++++++++++++++++-
2 files changed, 1456 insertions(+), 16 deletions(-)
@fareh
fareh / Santander_.gitignore
Created September 15, 2015 22:25
feature/stn-290
# Created by https://www.gitignore.io
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
## Directory-based project format:
.idea/
@subfuzion
subfuzion / curl.md
Last active April 14, 2025 15:31
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.