Skip to content

Instantly share code, notes, and snippets.

@ckunte
ckunte / autopair-underscores-backticks.json
Created February 3, 2013 08:23
Autopair underscores and backticks in Sublime Text (2) -- for Markdown editing. Save the following under Preferences → Key Bindings - User
[ // Auto-pair underscores
{ "keys": ["_"], "command": "insert_snippet", "args": {"contents": "_$0_"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[_a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.underscore", "match_all": true }
]
},
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 17, 2025 20:49
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@vizath
vizath / Responsive.js
Last active April 30, 2018 04:54
Create an object that you can listen on for screen sizes with incomplete Bootstrap example.
"use strict";
var EventEmitter = require('events').EventEmitter;
var CHANGE_EVENT = 'change';
var breakpoints = [0, 768, 992, 1200, Infinity];
var indexes;
var getSize = function() {
// http://stackoverflow.com/a/11744120/808657
@rosskevin
rosskevin / Col.js
Last active December 11, 2022 18:15
material-ui `next` responsive layout/grid using JSS (originally based on flexboxgrid.com)
// @flow
import React, {Component, Element, PropTypes} from 'react'
import classNames from 'classnames'
import pure from 'recompose/pure'
import merge from 'lodash/merge'
import {createStyleSheet} from 'jss-theme-reactor'
import Logger from '../../util/Logger'
import {capitalizeFirstLetter} from '../../util/strings'
type DefaultProps = {
@rosskevin
rosskevin / Box.js
Created September 23, 2016 17:30
Samples for material-ui `next` responsive layout/grid using JSS (originally based on flexboxgrid.com)
// @flow
import React, {Element, PropTypes} from 'react'
import pure from 'recompose/pure'
import {createStyleSheet} from 'jss-theme-reactor'
import classNames from 'classnames'
import Logger from '../../../util/Logger'
type Props = {
type: ?string,
children: ?Element<any>
@yitsushi
yitsushi / delete_my_slack_files.rb
Created October 3, 2016 15:51
delete old slack files (only images)
require "slack"
#
# gem install slack-api
#
# Get the token from here: https://api.slack.com/docs/oauth-test-tokens
#
client = Slack::Client.new token: ENV['TOKEN']