Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Copyright (c) 2010, Nicolas Pouillard
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@cocowalla
cocowalla / Dockerfile
Last active November 7, 2022 15:38
TimescaleDB on debian stretch-slim
# Docker image for PostgreSQL with the TimescaleDB extensions installed, running on a Debian Stretch-Slim base
# Begin by building TimescaleDB
FROM postgres:11.2 AS build
ENV TIMESCALEDB_VERSION 1.2.2
ENV TIMESCALEDB_SHASUM="c8e8071c24707e3fa8a50abb788c85d03a1bd9d9dea2e273b4abf407f39c182a timescaledb-${TIMESCALEDB_VERSION}.tar.gz"
RUN buildDeps="curl build-essential ca-certificates git python gnupg libc++-dev libc++abi-dev pkg-config glib2.0 cmake libssl-dev" \
&& apt-get update \
@harith
harith / shellmarks.sh
Last active September 18, 2022 07:50
Utilities to let you easily reach frequently visited but deeply nested directories.
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@sfider
sfider / LOOProfiling.h
Created July 8, 2012 18:16
Objective-C macro for measuring execution time of block of code.
//
// LOOProfiling.h
//
// Created by Marcin Swiderski on 4/12/12.
// Copyright (c) 2012 Marcin Swiderski. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//