Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# disables bloat packages on samsung devices
# tested with z fold 2
packages_to_uninstall=(
"com.microsoft.skydrive" \
"com.microsoft.office.excel" \
"com.microsoft.office.word" \
"com.microsoft.office.powerpoint" \
@davehughes
davehughes / .pgpass
Last active December 6, 2022 10:38
psql connection aliasing/management
# alias:northwind
db1.example.com:5432:northwind:postgres:hunter2
# alias:mainframe
db1.example.com:5432:mainframe:dave:password123
db1.example.com:5432:unaliased:postgres:
@jcgregorio
jcgregorio / How_to_use.html
Last active July 17, 2023 14:44
HTML Templating using the HTML <template> element and exactly 100 lines of JS. A cleaned up version of this code is now available at https://github.com/jcgregorio/stamp/.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="templating.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<template id=t>
@nolanlawson
nolanlawson / completion-for-gradle.md
Last active April 5, 2024 07:43
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
@abythell
abythell / ubuntu-domU.sh
Last active March 9, 2016 13:08
Bash script to install Ubuntu 12.04 as a Xen paravitualized domU guest on a Xen host with LVM.
#!/bin/bash
# Script to download, configure, and install Ubuntu as a Xen domU
# Uses existing LVM Volume Group. Must be run as root/sudo.
# Based on instructions at https://help.ubuntu.com/community/Xen
# User Configurable Settings
NAME=ubuntu # name of Domain to create
VG=/dev/domU # existing volume group in which to create a logical volume
LV=$NAME # name of the new logical volume to create
LV_SIZE=5G # size of the new logical volume
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--