Skip to content

Instantly share code, notes, and snippets.

@tfnico
tfnico / console.txt
Created October 4, 2012 11:17
how does ack work
➜ ~/projects/viaboxx-puppet/[master]✗>grep -r "site.erb" *
modules/apache2/manifests/init.pp: content => template("apache2/etc/apache2/sites-available/site.erb"),
➜ ~/projects/viaboxx-puppet/[master]✗>ack "site.erb"
➜ ~/projects/viaboxx-puppet/[master]✗>
# SOLUTION: By default, ack ignores unknown file types, including *.pp. This works:
➜ ~/projects/viaboxx-puppet/[master]✗>ack -a 'site.erb' -G '\.pp'
@tfnico
tfnico / paste.md
Created October 26, 2012 11:14
Sharing your uncommitted changes using git instaweb
On Wednesday, October 24, 2012 11:14:55 PM UTC+2, Joe Cabezas wrote:
hello!

i want to show uncommited changes using git instaweb, but instaweb only shows commited changes...

i just want to show the git diff output to someone easy..., there is any alternatives to git instaweb?, thank you

Interesting question. With a little trickery, you can get instaweb to do what you want.

Here's an example, I'll say I'm working on a repository ~/projects/gitblit

@tfnico
tfnico / git-developers.md
Last active December 22, 2021 13:59
When and how to contact the Git developers

Before you send an email to the Git developers' mailing list

If you are a normal Git user, and you have problems using Git, you can also try:

If you believe you've found a bug in Git for Windows or msysGit (Windows-specific), first check their issue tracker to see if the problem has already been reported. If not, send a message to msysgit@googlegroups.com or visit the online forum version.

@tfnico
tfnico / podcast-app.md
Last active December 10, 2015 18:18
Which PodCast android app?

My criteria:

  • Coming from Listen
  • Google Reader integration would be nice
  • Cross-device sync would be nice
  • I've got an old weak samsung galaxy s, but also a powerful new nexus 10. An app that works great on both would be cool.

The candidates so far:

BeyondPod

@tfnico
tfnico / console
Created February 20, 2013 09:00
git remote show
➜ ~/prefs/[master]✗>git remote show origin tfnico@Thomas-Ferris-Nicolaisens-iMac [10:00:02]
* remote origin
Fetch URL: git@github.com:tfnico/prefs.git
Push URL: git@github.com:tfnico/prefs.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
@tfnico
tfnico / Something.java
Created July 4, 2013 09:49
Sending a HTTP request with Java + Google Guava
public void sendMessage(String url, String params){
final HttpURLConnection connection;
try {
URL requestUrl = new URL(url);
connection = (HttpURLConnection) requestUrl.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Length", Integer.toString(params.getBytes().length));
connection.setRequestProperty("Content-Language", "en-US");
@tfnico
tfnico / logtree
Created July 18, 2013 09:23
This is a SVN repository of which I made a git svn clone. It's the output of git log --pretty=format:%h --graph --all
* ca2016c
| * e0c2cb7
| * c51b78f
| * 1ab694d
| * 32b2785
| | * d2cccc7
| | * 7f903ee
| | * 93afc10
| | * dd9b6c7
| | * 5fa6471
@tfnico
tfnico / 1.txt
Last active December 20, 2015 22:58
Trying to get go2arena.com to delete my account
# From Go2Arena
Dear Thomas Ferris Nicolaisen,
Welcome to Go2Arena. To log in when visiting our site just click Login or My Account at the top of every
page, and then enter your e-mail address and password.
Use the following values when prompted to log in:
E-mail: tfnico@gmail.com
Password: [xxxx]
@tfnico
tfnico / instructions.txt
Last active December 21, 2015 13:19
Instructions on how to port Dukto from SVN to Git
First create an author-map file for translating svn user names to Git user names in history:
$ cat author-map
em.colombo = Emanuele Colombo <em.colombo@gmail.com>
em.colombo@gmail.com = Emanuele Colombo <em.colombo@gmail.com>
Vittorio.Curcio = Vittorio Curcio <Vittorio.Curcio@dummy.example.com>
xxdede = xxdede <xxdede@dummy.example.com>
(no author) = no author <no-author@dummy.example.com>
Now, do a git svn clone:
@tfnico
tfnico / console
Created August 28, 2013 14:10
vcsh output
➜ ~/>vcsh status
tmux:
tmuxinator:
➜ ~/>vcsh tmux status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#