Skip to content

Instantly share code, notes, and snippets.

🐍
Python!

mattmc3 mattmc3

🐍
Python!
Block or report user

Report or block mattmc3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lambdamusic
lambdamusic / gist-backup.py
Last active Aug 24, 2019 — forked from fedir/gist-backup.py
Clone or update all user's gists #backup #github #gists #management
View gist-backup.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Forked from https://gist.github.com/fedir/5466075
Changes:
- allows to import Github gists into a local DASH database (https://kapeli.com/dash)
- gists are added to any existing snippet already in database
- filetypes are added, but support is very basic
View fts_fuzzy_match.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2016 Matt Menzenski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@Olical
Olical / fish_prompt.fish
Created Aug 14, 2015
My fish shell lambda prompt functions (they go in ~/.config/fish/functions) it's extremely fast too! :D
View fish_prompt.fish
# A lambda (λ) prompt.
# Green and red depending on exit status.
# Underlined if git status is dirty.
# Uppercase (Λ) if ahead of the remote.
function fish_prompt
if is_status_okay
set_color green
else
set_color red
@trusktr
trusktr / DefaultKeyBinding.dict
Last active Nov 17, 2019
My DefaultKeyBinding.dict for Mac OS X
View DefaultKeyBinding.dict
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@Bouke
Bouke / gist:10454272
Last active Nov 4, 2019
Install FreeTDS, unixODBC and pyodbc on OS X
View gist:10454272

First, install the following libraries:

$ brew install unixodbc
$ brew install freetds --with-unixodbc

FreeTDS should already work now, without configuration:

$ tsql -S [IP or hostname] -U [username] -P [password]
locale is "en_US.UTF-8"
locale charset is "UTF-8"
@railwaycat
railwaycat / Emacs_starter.pl
Last active Oct 8, 2019
Start Emacs.app from CLI
View Emacs_starter.pl
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
@nicerobot
nicerobot / backup.sh
Last active Jul 28, 2019 — forked from joneskoo/gist-backup.py
Clone or update a user's gists locally
View backup.sh
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3
@netj
netj / csv2tsv.py
Created Aug 16, 2010
CSV to TSV python one-liner
View csv2tsv.py
#!/usr/bin/env python
import sys,csv
for row in csv.reader(sys.stdin):
print "\t".join(row)
You can’t perform that action at this time.