Skip to content

Instantly share code, notes, and snippets.

cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
@emkay
emkay / build-grub-osx.sh
Last active January 25, 2024 04:25
Build Grub on OSX
#!/bin/sh
set -e
# First we are going to make sure that you understand this is sort of experimental and we will be compiling stuff.
# by default CONTINUE will be false
CONTINUE=false
echo ""
echo "You are about to download, compile, and install stuff on your computer."
@coorasse
coorasse / main.js
Last active February 6, 2018 12:36
Bitbucket Codeship PullRequest integration script
$(function() {
var bitbucket_project_name = 'YOUR BITBUCKET PROJECT_NAME LIKE coorasse/airesis';
var codeship_project_code = 'YOUR CODESHIPO PROJECT UUID CODE (look for it in the badge instructions page or general settings page)';
var regexp = new RegExp("^https://bitbucket.org/" + bitbucket_project_name + "/pull-request/","g");
if ((regexp).test(window.location.href)) {
var branch = $('dd.unabridged a').first().html();
var url = 'https://codeship.com/projects/'+codeship_project_code+'/status?branch='+branch;
var row = $('<div></div>')
var column1 = $('<dt>Codeship</dt>');
@shauns
shauns / github_visualise.py
Created April 8, 2015 17:21
Visual GitHub pull requests
from __future__ import unicode_literals
from collections import defaultdict
import random
import requests
from graphviz import Digraph
USERNAME = 'shauns'
PASSWORD = '****'
@tarruda
tarruda / snake.py
Last active June 11, 2021 00:01
snake.py
# Snake for Neovim! Adapted from https://gist.github.com/sanchitgangwar/2158084
# To install, create a ~/.vim/rplugin/python/snake.py file with this
# code, then run `nvim -c 'UpdateRemotePlugins' -c 'q'` from a shell.
#
# Make sure you have read the internal help explaining how to setup python
# host for external plugins(:help nvim-python)
#
# To start a new game, use the `:SnakeStart` command on an empty buffer(uses 80
# columns and 20 rows)
from threading import Thread, Lock
@junkafarian
junkafarian / make_mysql_ramdisk
Last active October 12, 2015 14:08
make an in memory ramdisk with a mysql db installed for fast integration / functional tests
Then run the 2 mysql servers with:
/usr/local/bin/mysqld_multi start --tcp-ip 1,2
@thibautsacreste
thibautsacreste / rack_show_session.rb
Last active March 12, 2021 13:43
Ruby: decode rack session cookie
require 'base64'
require 'cgi'
def show_session(cookie)
Marshal.load(Base64.decode64(CGI.unescape(cookie.split("\n").join).split('--').first))
end
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@instanceofme
instanceofme / diacritics.js
Created February 3, 2012 18:31
Remove diacritics
/**
* Remove diacritics (accent and other marks) on characters, and dissociate double characters.
* Based on the character map of http://lehelk.com/2011/05/06/script-to-remove-diacritics/
* but per-character walk (improved performance).
*
* Licensed under WTFPL v2 http://sam.zoy.org/wtfpl/COPYING
*/
var removeDiacritics = (function() {
var diacritics = {"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B",