Skip to content

Instantly share code, notes, and snippets.

@nivir
nivir / list_modifications.py
Created January 4, 2016 03:15 — forked from preshing/list_modifications.py
List the contents of folders recursively, sorted by modification time.
#! /usr/bin/env python
# License: http://creativecommons.org/publicdomain/zero/1.0/
# See http://preshing.com/20130115/view-your-filesystem-history-using-python
import optparse
import os
import fnmatch
import time
# Parse options
parser = optparse.OptionParser(usage='Usage: %prog [options] path [path2 ...]')
@nivir
nivir / exif_date.py
Created January 4, 2016 03:49 — forked from ikoblik/exif_date.py
Python script to update image creation and modification dates to the EXIF date.
#!/usr/bin/env python
"""A simple utility to restore file creation and modification
dates back to their original values from EXIF.
This script requires exif module to be installed or the exif
command line utility to be in the path.
To function correctly under windows this script needs win32file and
win32con modules. Otherwise it will not be able to restore the creation
@nivir
nivir / Default (Linux).sublime-keymap
Created January 6, 2016 14:59 — forked from thbkrkr/Default (Linux).sublime-keymap
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@nivir
nivir / Meteor Error
Created January 6, 2016 21:56
Meteor autoform wizard publish error
►► meteor-autoform-wizard ►► (master)
meteor publish --create
Please log in with your Meteor developer account. If you don't have one, you can quickly create one at www.meteor.com.
Username: nivir
Password:
/Users/Roy/.meteor/packages/meteor-tool/.1.1.10.18880n++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:278
throw(ex);
^
Error: socket hang up
# This little gist shows how to easily internationalize your application using the meteor-just-i18n package.
# Package repository: https://github.com/subhog/meteor-just-i18n/
# 1. Adding the package.
$ meteor add anti:i18n
@nivir
nivir / gist:288c9deae0282f0e3c9d424098ccffdd
Created June 21, 2016 15:29 — forked from n00neimp0rtant/gist:9515611
simple squash without rebase
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname
@nivir
nivir / .bash_profile
Created July 30, 2016 10:48 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIFU6JCJQ6hQEIJaXVxhSXhZKWar+jOWlVp/eYOv9RxYDtbmLFf9UNTRVpc6Ae5FakeV/iHjfEXY76YJLc7sMXp6+Xt1fvTsaQY/RqdgLPcKPXd7euG44fwNia8+3pL24psFf5qE+YG/ZEJYW+wEkqUU7zECyKjFXAQHdsVKg3+Wm2eO3Y6BDTpEv0mA0gw81TvIPBwGGOBh/JsWPZxBpYYCFlJmroItt9Iy9RpiWFGAx+eYew9qbUAzwsBbqq4yagbOueNIWYKunZBW4S98bbZ1/WCzSgwMFbsAiDMITlxZi1AeIEdx292qzi/ENlQxKrlDqyMcqITryXAfs2SquB [email protected]
@nivir
nivir / git-blame-club.txt
Created September 18, 2016 20:24 — forked from ldodds/git-blame-club.txt
Git Blame Club
Welcome to Git Blame Club.
The first rule of Git Blame Club is: you do not blame other people.
The second rule of Git Blame Club is: you DO NOT blame other people!
Third rule of Fight Club: if someone yells "CONFLICT!", goes limp, or taps out, the blaming is over.
Fourth rule: only two branches to a merge.
Fifth rule: one merge at a time, everyone.
Sixth rule: the merges are command-line. No editors, no GUIs.
Seventh rule: merges will go on as long as they have to.
And the eighth and final rule: if this is your first day at Git Blame Club, you have to commit.
{
"Body": {
"ErrorCode": 500,
"FaultMessage": "id cannot be null or empty",
"IsTransient": false,
"StackTrace": "System.ArgumentException: id cannot be null or empty\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.AttachmentRetriever.CreateInstance(String id, CallContext callContext)\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.GetAttachment.InternalExecute()\u000d\u000a at Microsoft.Exchange.Services.Wcf.ServiceCommand`1.DetectDuplicatedCallOrExecute()\u000d\u000a at Microsoft.Exchange.Services.Wcf.ServiceCommand`1.Execute()\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.OWAService.GetFileAttachment(String id, Boolean isImagePreview, Boolean asDataUri)\u000d\u000a at SyncInvokeGetFileAttachment(Object , Object[] , Object[] )\u000d\u000a at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)\u000d\u000a at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc