Skip to content

Instantly share code, notes, and snippets.

@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
# 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 / 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
@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 / 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 / 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 ...]')
server.gaddeagroup.com,146.185.172.6 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8JBN1GY0lObADO4tRBxJugw4bL/hP6jxyU+C6MNJnpUXmlhnJee8XWu3KA9ZfDEPHOkXOrifaQlnenVS/ACdGjOUs79Eh4DSXiQdzu+urznU21bGzbihBIGxCTwMfHp7vZGA7U3Iew+4rXpCvDFt1iea0CQGgbK3vxEgBxovVT5Ze5u4QpUVLzCfGC/jQ9Ahzom2Ed/s0XLJzQF28qRptv51GOslGpbFCcVd/bHVCIlHD4OoMMkeyZG1UOu+r1Fg7LoVMRxoWRDqggow+5kZ4b4nug9H+kVDus/o4m5Cip4BxlnZRrgHJ8opyPorW+HzWDQ8wt5i6L28SZFQdgkSr
git clone ssh://[email protected]/project_name/repository.git
Cloning into 'inventopy_src'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for server_location has changed,
and the key for the corresponding IP address 46.101.128.148
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
git pull
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From ssh://project_location
* [new branch] master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git push -u origin master
To ssh://[email protected]_server_location.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'ssh://git@server_location/inventopy_src.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.