Skip to content

Instantly share code, notes, and snippets.

@Geraint
Geraint / config
Created June 8, 2018 14:30
%home%\AppData\Roaming\wsltty
BoldAsFont=no
ForegroundColour=191,191,191
Term=xterm-256color
SwitchShortcuts=no
Black=78,78,78
Red=255,108,96
Green=168,255,96
Yellow=255,255,182
Blue=150,203,254
Magenta=255,115,253
@Geraint
Geraint / getter
Last active March 16, 2018 10:08
Eclipse Template - PHP getter with explicit return type
/** @var ${type} */
private $$${property};
public function get${propertyCapital}() : ${type}
{
return $$this->${property};
}
${cursor}
@Geraint
Geraint / sf2c
Last active August 29, 2015 14:25
Eclipse Template for Symfony2 Controller
namespace ${bundle}Bundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ${controller}Controller extends Controller
{
/**
@Geraint
Geraint / cVimrc
Last active August 29, 2015 14:05
cVimrc
let defaultengine = "duckduckgo"
let barposition = "bottom"
let locale = "uk"
let blacklists = ["https://mail.google.com/*"]
imap <C-i> editWithVim
@Geraint
Geraint / gist:8781421
Last active August 29, 2015 13:55
Puppet Cheat Sheet
@Geraint
Geraint / vim-cheatsheet.md
Last active July 15, 2020 21:46
Cheat sheet for vim

Vim Cheat Sheet

Movement

By "Word"

  • w forward to beginning of the next word
  • W forward to beginning of the next word (whitespace separates)
  • e forward to end of next word
  • E forward to end of next word (whitespace separates)
  • b back to beginning of the previous word
@Geraint
Geraint / tmux-cheatsheet.md
Last active December 29, 2015 20:29
Cheat-sheet for tmux

tmux Cheat Sheet

Session management

Creating sessions

  • tmux - creates a new session
  • tmux new-session - also creates a new session
  • tmux new-session -s foo - creates a new session named foo
  • tmux new -s foo - also creates a new session named foo
@Geraint
Geraint / sudoers
Last active December 26, 2015 17:38
trying to figure out sudoers syntax
User_List Host_list = (Run_As) Cmnd_Spec_List
%wheel ALL = (ALL) ALL
jenkins slave.local = (backup_user) NOPASSWD: /path/to/backup.sh
@Geraint
Geraint / getset
Last active December 22, 2015 07:38
Eclipse Template - getset
/** @var ${type} */
private $$${property};
/**
* Returns the ${property} value.
*
* @return ${type}
*/
public function get${propertyCapital}()
{
@Geraint
Geraint / class
Created September 3, 2013 13:14
Eclipse Template - PHP Class
/**
* Holds definition of ${class_name}
* @package ${package_name}
*/
/**
* ${class_description}
* @package ${package_name}
*/
class ${class_name}