Skip to content

Instantly share code, notes, and snippets.

Working from home

kapitanluffy kapitanluffy

Working from home
View GitHub Profile
View SublimeLinter.sublime-settings
"debug": true,
"delay": 0.5,
"linters": {
// basically, this is just what you need in enabling a linter
"php": {
"disable": false
"phpcs": {
"args": [
View .tmux.conf
set -g prefix C-space
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tpm'
kapitanluffy / compiler.php
Created Nov 12, 2019
Compiles classes into a single giant package file
View compiler.php
* Compiles all files into one giant package file
* Usage php compiler.php path/directory/PackageFoo
* We assume that your package is under a package folder. This will be used as the package file name
* e.g. path/directory/PackageFoo/
kapitanluffy / mount.bat
Created Apr 22, 2019
Mount directory to specified drive letter with fallback to achieve ubiquity across networks
View mount.bat
@echo off
:: Mount directory to specified drive letter with fallback to achieve ubiquity across networks
:: Checks existence of host by the following order
:: - Check host in LAN
:: - Check host in Remote
:: - Check host in Local
:: Since Windows does not have native support for sftp/ssh we use sshfs (FUSE) instead
kapitanluffy / gamifyApi.js
Created Mar 18, 2019
View gamifyApi.js
function gamifyApi() {
window.location.href = ""
+ window.CustomerProfileRootProps.directedId
+ "?ownerView=false"
+ "&customerFollowEnabled=false"
+ "&token=" + window.CustomerProfileRootProps.contributorDashboardData.token
kapitanluffy /
Created Jan 25, 2019
Convenience script for installing docker in Ubuntu
# Convenience script for installing docker in Ubuntu
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL | sudo apt-key add -
View isEven.php
function isEven($num) {
return ($num % 2 == 0);
View screen_cheatsheet.markdown

Screen Quick Reference


Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
kapitanluffy / SetTransparency.bat
Created Dec 7, 2018
Portable batch file for creating SetTransparency.exe in Sublime Text directory
View SetTransparency.bat
@echo off
SETLOCAL EnableDelayedExpansion
:: Run to automatically place SetTransparency.exe in ST3 installation folder instead of downloading it from repo
:: Original exe found @
:: Related issue @
:: Settings
set stpath=%ProgramFiles%\Sublime Text 3
set exefile=SetTransparency.exe
View StringList.php
class StringList extends \ArrayObject
protected $data = [];
public function __construct($data, $delimiter = " ")