Skip to content

Instantly share code, notes, and snippets.

View matlads's full-sized avatar

Martin Atukunda matlads

View GitHub Profile

Keybase proof

I hereby claim:

  • I am matlads on github.
  • I am matlads (https://keybase.io/matlads) on keybase.
  • I have a public key ASAXXjXBV2AtaTYKqn0m-Yy1YwMKG0QSNqwVYjyrQTJOXgo

To claim this, I am signing this object:

investigate how to create a git tree command :)
@matlads
matlads / README.md
Created July 12, 2017 13:26
Marionette Leaflet example

Marionette Leaflet example

After looking for a way of doing using leaflet with Marionettet, I eventually hunkered down and built this.

You need the following libraries in the lib/ folder

  • requirejs
  • jquery
  • underscore
@matlads
matlads / collections_to_csv
Created August 2, 2016 08:43
Bash script to output a set of mongo collections to files ( as csv )
#!/bin/bash
collections=('account', 'admin', 'alarm')
MONGO_PORT=27117
MONGO_FIELDS='_id,attr_hidden,attr_hidden_id,attr_no_delete,attr_no_edit,name,site_id'
for collection in ${collections[*]}; do
# echo the command
echo mongoexport --port $MONGO_PORT -d ace -c $collection -f $MONGO_FIELDS --csv -o $collection.csv
@matlads
matlads / dillo.rb
Last active January 20, 2023 14:33
Homebrew formula for dillo
class Dillo < Formula
desc "A multi-platform graphical web browser"
homepage "http://www.dillo.org"
url "http://www.dillo.org/download/dillo-3.0.5.tar.bz2"
sha256 "db1be16c1c5842ebe07b419aa7c6ef11a45603a75df2877f99635f4f8345148b"
depends_on "fltk"
def install
system "./configure", "--disable-dependency-tracking",
@matlads
matlads / pg_col_resize.sh
Last active December 17, 2015 14:39 — forked from mcnemesis/pg_col_resize.sh
Check for proper number of command line args.
#!/usr/bin/sh
if [ $# -ne 5 ]
then
echo "Usage: "$0" DBUSER DB TABLE COL NEWSIZE"
else
USER=$1
DB=$2
TABLE=$3
COL=$4
SIZE=$5
@matlads
matlads / check-df-mail.pl
Created November 26, 2012 15:08
Checking disk space using Filesys::Df with Email::Simple to email warnings.
#!/usr/bin/env perl
use strict;
use warnings;
use Filesys::Df;
use Email::Simple;
use Email::Sender::Simple qw(sendmail);
my $warn_limit = 75;
diff --git a/docs/curl.1 b/docs/curl.1
index 6808d07..1294973 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -266,7 +266,7 @@ data pieces specified will be merged together with a separating
&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
chunk that looks like \&'name=daniel&skill=lousy'.
-If you start the data with the letter @, the rest should be a file name to
+If you start the data with the letter @, the rest should either be a file name to