Skip to content

Instantly share code, notes, and snippets.

@arturfog
arturfog / gnome-terminal-bold-fonts.sh
Created January 2, 2019 15:03
disable bold fonts in gnome terminal
dconf write /org/gnome/terminal/legacy/profiles:/:<id>/allow-bold false
@LazyMammal
LazyMammal / hide_live_chat.js
Created September 20, 2017 11:54
Hide live chat by default on YouTube live streams
// ==UserScript==
// @name YouTube - Hide Live Chat
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide live chat by default on live streams
// @author LM
// @match https://www.youtube.com/watch*
// @run-at document-end
// @grant none
// ==/UserScript==
@joshuacalloway
joshuacalloway / SecureRequestCache
Created February 27, 2015 00:08
HowTo force Spring Security to make https redirect requests when behind a load balancer
package com.retel.security;
import org.springframework.security.web.PortResolver;
import org.springframework.security.web.PortResolverImpl;
import org.springframework.security.web.WebAttributes;
import org.springframework.security.web.savedrequest.DefaultSavedRequest;
import org.springframework.security.web.util.UrlUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@baskaran-md
baskaran-md / nginx.conf
Created September 2, 2014 20:20
NginX allow POST on static pages.
# ...
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
@cpdean
cpdean / doge.md
Last active November 21, 2021 08:51
YOU'RE WELCOME, INTERNET. -- if you search for an ascii doge, you don't get anything great that you can copy paste. found a silly gif (http://cmang.org/ascii/cm-doge-bw.gif) and i have transcribed it for all of you

no clue who made this, but ARTIST FOUND thank you @indyjoenz / cmang!

i have transcribed it here:

                Y.                      _   
                YiL                   .```.  
                Yii;                .; .;;`.    
                YY;ii._           .;`.;;;; :    
 iiYYYYYYiiiii;;;;i` ;;::;;;; 
@mntmn
mntmn / mbp_retina_trackpad.md
Created November 10, 2013 19:02
Good setup for MacBook Pro Retina 13" trackpad in Linux/Xorg/X11 (Debian jessie for me). Handles resting thumb and thumb-click-indefinger-drag correctly. Also fixes jerk/jump on very small movements that ought to be precise.
  1. Use xf86-input-mtrack

Debian Jessie (w/ gnome3) uses the "synaptics" xf86 input module as a default. It is very precise but doesn't support "resting thumb" behaviour that you're used to from OSX.

xf86-input-mtrack is an enhancement of xf86-input-multitouch which is configurable. I built it from source from here: https://github.com/BlueDragonX/xf86-input-mtrack But i see that it's also in the debian package repo. So you probably only need to do:

sudo aptitude install xserver-xorg-input-mtrack

I created an override config in /etc/X11/xorg.conf.d/50-synaptics.conf (create the directory if it doesn't exist) which looks like this:

@eshizhan
eshizhan / conv2vmx-ovf.py
Last active April 25, 2021 22:05
a script that can help import VMs into VMware ESXi from VirtualBox. tested vbox 4.2.18 and ESXi 5.1.
#!/usr/bin/env python
#
# usage:
# conv2vmx-ovf.py some-vm.ovf
#
# ref: http://www.cnblogs.com/eshizhan/p/3332020.html
#
import sys
fn = sys.argv[1]
@ccschmitz
ccschmitz / ST2 Multiple Cursor Keybindings.md
Created August 11, 2012 18:33
Create keybindings for multiple cursors in Sublime Text

Create Multiple Cursors from the Keyboard in Sublime Text

The following keybindings will allow you to create multiple cursors (above or below the current cursor) with Command + Option + (Up|Down). On Windows it would be Control + Alt + (Up|Down).

{ "keys": ["super+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["super+alt+down"], "command": "select_lines", "args": {"forward": true} }
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@olivierlacan
olivierlacan / An_example.markdown
Created February 18, 2012 05:40 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.