Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
subtleGradient / Brilliance Black (Inverted).tmTheme
Created January 3, 2010 22:52
Brilliance Black, My Little Pony (Brilliance White), Brilliance Dull TextMate Themes in the `tmTheme` format. By Thomas Aylott (SubtleGradient). These themes were designed so that logically similar things will have similar colors. These are extremely rich
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Thomas Aylott</string>
<key>comment</key>
<string>Thomas Aylott ㊷ subtleGradient.com</string>
<key>name</key>
<string>Brilliance Black (Inverted)</string>
@StefanoRausch
StefanoRausch / Default (OSX).sublime-keymap
Created February 14, 2013 16:26
Sublime : 2 Columns Layout Management
[
{ "keys" : [ "alt+1" ], "command" : "focus_group", "args" : { "group" : 0 } },
{ "keys" : [ "alt+2" ], "command" : "focus_group", "args" : { "group" : 1 } },
{ // workspace left
"keys" : [ "ctrl+alt+super+left" ],
"command" : "run_multiple_commands",
"args" : {
@thomasmichaelwallace
thomasmichaelwallace / unique.js
Created August 1, 2017 16:20
Getting unique values using sets in ES6.
// with arrays
const dupArr = [1, 1, 2, 3, 1];
const uniArr = [...(new Set(dupArr))];
// [1, 2, 3]
// with objects on a key.
const dupObj = [{ id: 1, value: 'a' }, { id: 2, value: 'b' }, { id: 1, value: 'c' }];
const uniKeys = [...(new Set(dupObj.map(({ id }) => id)))];
// [ '1', '2' ]
@anandkkpr
anandkkpr / heidi_sql-ssh_tunnel-putty_plink.md
Created March 26, 2014 18:49
Enable SSH Tunnel for a connection in Heidi SQL using PLink.exe from PuTTY
@MSylvia
MSylvia / convert_itermcolors.py
Created June 14, 2014 14:29
Convert .itermcolors file to html hex
#!/usr/bin/env python
#
# Convert .itermcolors files to hex colors for html
import sys
import xml.etree.ElementTree as ET
def rgb_to_hex(rgb):
return '#%02x%02x%02x' % rgb
@brenopolanski
brenopolanski / npm-list-globally.md
Created November 1, 2016 19:34
Listing globally installed NPM packages and version
npm list -g --depth=0
@busyevolving
busyevolving / circle-follow-cursor.markdown
Created September 23, 2019 10:48
Circle Follow Cursor
@zabaala
zabaala / BindDatabaseServiceProvider.php
Last active March 2, 2021 07:50
php artisan db:log <start> <stop>
<?php
namespace App\Commands\Database;
use Illuminate\Support\ServiceProvider;
class BindDatabaseServiceProvider extends ServiceProvider
{
public function boot()
{
@lezhnev74
lezhnev74 / validator.php
Last active March 9, 2021 03:53
Replace custom placeholder in Validation message (Laravel)
<?php
// When I create a validation rule, I can set my one replacer which helps replace different special placeholders
// For example if validator message is "Problem with :some", then my replacer will handle it
Validator::extend('testrule', function($attribute, $value, $parameters, $validator) {
$validator->addReplacer('testrule', function($message, $attribute, $rule, $parameters){
return str_replace(":some", "whatever", $message);
});
@finger-berlin
finger-berlin / beanstald.sh
Created February 29, 2012 16:35
OSX script for easy start & stop beanstalkd (brew version)
#!/bin/sh
daemon=beanstalkd
executable=/usr/local/bin/$daemon
port=11300
waldir=/usr/local/var/beanstalkd
logfile=/usr/local/var/log/beanstalkd.log
interface="127.0.0.1"
params="-l $interface -p $port -b $waldir"