Skip to content

Instantly share code, notes, and snippets.

sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
dscacheutil -flushcache
brew services restart dnsmasq
@facine
facine / tmux.md
Created March 9, 2018 11:03 — forked from jonhattan/tmux.md
tmux quickstart

tmux quickstart

$ tmux

CTRL+B C -> create new pane

CTRL+B [num] -> go to a pane

CTRL+D -> finish bash session, closes the pane. Closing all panes will destroy the window and thus the tmux

@jonhattan
jonhattan / tmux.md
Last active March 9, 2018 11:03
tmux quickstart

tmux quickstart

$ tmux

CTRL+B C -> create new pane

CTRL+B [num] -> go to a pane

CTRL+D -> finish bash session, closes the pane. Closing all panes will destroy the window and thus the tmux

@e0ipso
e0ipso / controller-pattern.php
Last active August 29, 2015 14:08
Accessors and mutators
<?php
class MyController extends ControllerBase implements ControllerInterface {
/**
* @var MyClass1
* Object of Class 1
*/
protected $obj1;
@alnutile
alnutile / custom_step.php
Created January 6, 2014 20:09
Using Behat / Mink and Javascript / jQuery to test the height of an element
/**
* See if the element (name|label|id) is greater than the % of the window
*
* @Then /^the element "([^"]*)" should be "([^"]*)" percent or greater than the window$/
*/
public function theElementShouldBePercentOrGreaterThanTheWindow($arg1, $arg2)
{
//1. make sure the target exists
//2. get the height of the target
//3. compare it to the window height
@e0ipso
e0ipso / magic.php
Created September 13, 2013 09:33
Brief introduction to some OOP features present in PHP5.
<?php
/**
* A base class with getters and setters incorporated.
*/
class ObjectBase {
/**
* Setter function for a generic attribute.
*
* @param string $property_name
@juampynr
juampynr / mymodule.info
Last active June 9, 2023 21:53
Drupal 7 Views 3 custom field handler
dependencies[] = ctools
; Views Handlers
files[] = views/mymodule_handler_handlername.inc