Skip to content

Instantly share code, notes, and snippets.

View msridhar's full-sized avatar

Manu Sridharan msridhar

View GitHub Profile
#!/usr/bin/swift
// Run: $ swift noCrashplan.swift
// Background: https://github.com/KrauseFx/overkill/issues/3#issuecomment-270505227
import Foundation
import Cocoa
import ServiceManagement
let badApps = [ "Code42 CrashPlan", "CrashPlanService", "CrashPlanLauncher", "CrashPlanWeb" ]
@jamesramsay
jamesramsay / README.md
Last active April 8, 2024 13:05
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
@dudadornelles
dudadornelles / resolvedVersionOf
Last active December 30, 2017 16:50
Gradle - get resolved version of a dependency
def getResolvedVersionOf(dependency) {
return configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.asList().collectAll { e ->
if (e.moduleName == dependency) {
return e
}
}[0].moduleVersion
}
@fernandezpablo85
fernandezpablo85 / git-maven-howto.md
Last active April 16, 2024 17:02
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository

Cd into it

@lisamelton
lisamelton / detect-crop.sh
Last active November 28, 2018 02:39
Detect crop values for video file to use with `mplayer` and `transcode-video.sh` (a wrapper script for `HandBrakeCLI`).
#!/bin/bash
#
# detect-crop.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 3.3 of January 22, 2015
@lisamelton
lisamelton / transcode-video.sh
Last active September 8, 2023 23:51
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@henare
henare / mw-to-gollum.rb
Created March 10, 2011 02:41
Imports a MediaWiki XML export into a Gollum wiki
#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
require 'gollum'
wiki = Gollum::Wiki.new('openaustralia.wiki')
file = File.open("OpenAustralia-20110309232515.xml", "r")
doc = Hpricot(file)
@troy
troy / save-redfin-listing-images-bashrc
Created September 10, 2009 13:22
Given a redfin.com house listing URL, save all full-size images
# usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567"
function redfin-images() {
wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget -
}