Skip to content

Instantly share code, notes, and snippets.

View andreineculau's full-sized avatar
:bowtie:

Andrei Neculau andreineculau

:bowtie:
View GitHub Profile
@andreineculau
andreineculau / sake.sh
Created October 22, 2016 12:08
make stderr without "overriding/ignoring old recipe" warnings
#!/usr/bin/env bash
make $@ 2> >(grep -v "warning: \(overriding\|ignoring\)" >&2)
@andreineculau
andreineculau / amazon-0-logic-1.txt
Created May 6, 2016 20:14
Comment: extrapolating Amazon's logic on banning Kodi from their app store because it is too extensible, thus it allows people to play pirated content.
Traffic lights should be removed because they allow people to cross red lights.
Hospitals should all shut down because treatments there can have harmful effects when done incorrectly.
Companies should stop selling food because it allows people to eat too much and could cause medical problems in the long run.
Tools should be banned because they could be used maliciously.
Stores should all close because it would allow the possibility of shoplifting.
@andreineculau
andreineculau / git-commit-files.sh
Created November 27, 2015 12:32
<commit-files> git command - for when you think nice commit message is just brogramming talk
#!/usr/bin/env bash
set -e
MESSAGE="$(git diff --cached --name-only | tr '\n' ' ')"
[[ -n ${MESSAGE} ]] && {
git commit -m "modified ${MESSAGE}" $@
} || {
git commit $@
}

Keybase proof

I hereby claim:

  • I am andreineculau on github.
  • I am andreineculau (https://keybase.io/andreineculau) on keybase.
  • I have a public key whose fingerprint is B779 C476 7E36 2833 7155 D46D D4EE 2665 33A0 0BC9

To claim this, I am signing this object:

@andreineculau
andreineculau / -
Last active August 29, 2015 14:20 — forked from kemitchell/-
74925 NONE
54706 MIT
9268 ISC
3050 BSD
1521 BSD-2-CLAUSE
791 APACHE-2.0
699 APACHE 2.0
392 BSD-3-CLAUSE
364 WTFPL
346 UNKNOWN
@andreineculau
andreineculau / sendmail.app
Last active February 2, 2018 16:41 — forked from masnick/gist:6985205
a nice way to send mail from the shell in osx
#!/usr/bin/env osascript
# usage: sendmail.app from@me.com to@you.com,and@you.com "have you seen this?" "a nice way to send mail/attachment from the shell in osx (if you have configured Mail.app) https://gist.github.com/andreineculau/38f6160cc9aa11956953"
on theSplit(theString, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
@andreineculau
andreineculau / json_pretty_print
Created March 3, 2015 16:28
json pretty print with python without json.tool
#!/usr/bin/env python
import sys
try:
import json
hasJson = True
except ImportError:
hasJson = False
@andreineculau
andreineculau / etc_ppp_ip-ip
Created January 17, 2015 15:16
route off vpn
#!/usr/bin/env bash
exit 0
# refs
# http://archives.aidanfindlater.com/blog/2010/02/03/use-vpn-for-specific-sites-on-mac-os-x/
# http://superuser.com/questions/424862/how-do-i-make-certain-web-addresses-use-a-specific-network-adapter-on-mac-os-x
# http://superuser.com/questions/4904/how-to-selectively-route-network-traffic-through-vpn-on-mac-os-x-leopard
# Script which handles the routing issues as necessary for pppd,
@andreineculau
andreineculau / sync_rb.sh
Last active August 29, 2015 14:10
Update/sync reviewboard repositories and users
#!/usr/bin/env bash
rb_user=rb
rb_pass=rb_password
trac_url="https://repository/trac"
mirror="gitolite@repository"
authors_file="/var/authors.txt" # git svn authors file
password="pbkdf2_sha256$12000$4qXnxOva60Uy$uI/dCC0yn9g5IUILNxFfemoZQMKGoIVLHcySnmJNR70="
run_mysql="mysql -u ${rb_user} --password=${rb_pass} reviewboard -B -e"

Keybase proof

I hereby claim:

  • I am andreineculau on github.
  • I am andreineculau (https://keybase.io/andreineculau) on keybase.
  • I have a public key whose fingerprint is 1B0F 43F7 67F2 151F A270 D56C 61CE E602 79AC 0807

To claim this, I am signing this object: