Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir openwrt_build
cd openwrt_build
git clone --depth=1 git://git.openwrt.org/15.05/openwrt.git
@erica
erica / gist:7c298164409795bbf92f
Last active August 29, 2015 14:18
Launch at Login Helper
//
// LaunchAtLoginHelper.swift
//
// Created by Erica Sadun on 4/1/15.
// Copyright (c) 2015 Erica Sadun. All rights reserved.
//
import Foundation
public func getLoginItems() -> LSSharedFileList? {
@BlakeGardner
BlakeGardner / compact.js
Last active February 19, 2024 16:55
Compact all collections inside of a MongoDB database
// This script loops though the list of collection names in a MongoDB and runs the compact operation on them
// Simply paste this into the Mongo shell
use testDbName;
db.getCollectionNames().forEach(function (collectionName) {
print('Compacting: ' + collectionName);
db.runCommand({ compact: collectionName });
});