Skip to content

Instantly share code, notes, and snippets.

@nicetrysean
nicetrysean / weechat.conf
Created July 9, 2014 14:09
Weechat Configuration
#
# weechat.conf -- weechat v0.4.3
#
[debug]
[startup]
command_after_plugins = ""
command_before_plugins = ""
display_logo = on
@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@knubie
knubie / .tmux.conf
Last active September 13, 2017 10:12
Experimental zsh/tmux set up. Display CWD/vim file and git repo information in the tmux status bar.
# Update the status bar by fetching an environment variable set earlier by a shell script.
# Requires Thomas Adam's hook patch for tmux
# https://github.com/ThomasAdam/tmux/tree/ta/hooks
set-hook -g -n 'after-select-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""'
set-hook -g -n 'after-kill-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""'
module Jekyll
class LessConverter < Converter
safe true
priority :high
def setup
return if @setup
require 'less'
@setup = true
rescue LoadError
@adambird
adambird / random.rb
Created May 15, 2013 07:49
Methods for generating randomised variables for testing purposes
def random_string
(0...24).map{ ('a'..'z').to_a[rand(26)] }.join
end
def random_symbol
random_string.to_sym
end
def random_integer
rand(9999)
@nladart
nladart / index.html
Created March 18, 2013 02:59
A CodePen by Nick LaDart. Css3 animation
<div class="logo">
<div class="color-1"></div>
<div class="color-2"></div>
<div class="text">76</div>
</div>
@simplethemes
simplethemes / minify-theme.php
Created January 17, 2013 05:12
minify WordPress theme styles.
/*-----------------------------------------------------------------------------------*/
// Register and Minify Core Stylesheets
/*-----------------------------------------------------------------------------------*/
function st_registerstyles() {
// minify folder name (must be in your wp root).
$minpath = '/min';
// define directories
$child_theme = str_replace(site_url().'/wp-content/themes/', '', get_bloginfo('stylesheet_directory'));
@n1k0
n1k0 / 404checker.js
Created January 11, 2013 10:55
A CasperJS script to check for 404 & 500 internal links on a given website
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/
@huangjs
huangjs / gist:4273403
Created December 13, 2012 01:54
Example code for using FullContact influencer notification in iced-coffee-script on node.js.
# This is example code for influencer notification using FullContact on node.js
# Programming language used here is iced-coffee-script
# Author: Maptia
# License: public domain
_ = require 'underscore'
iced = require('iced-coffee-script').iced
request = require 'request'
fullContactAPIKey = '<your-fullcontact-api-key>'
@tagrudev
tagrudev / yolo
Last active May 13, 2017 13:51
YOLO practices #RubyOnRails
# Do not refactor, it is a bad practice. YOLO
# Not understanding why or how something works is always good. YOLO
# Do not ever test your code yourself, just ask. YOLO
# No one is going to read your code, at any point don't comment. YOLO
# Why do it the easy way when you can reinvent the wheel? Future-proofing is for pussies. YOLO