- Install Git
- Create a GitHub account
- Open Terminal
/Applications/Utilities/Terminal.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"-------------------------------------------------------------------- | |
" | |
" NiLuJe's ViM Configuration File | |
" | |
" Highly inspired from Ciaran McCreesh's config | |
" | |
" (http://ciaranm.org/vimrc) | |
" | |
" $Id$ | |
" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=gcc | |
CFLAGS=-Wall -std=c99 -ggdb | |
main: main.o hash.o | |
clean: | |
rm -f main main.o hash.o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//harry huang [[email protected]] | |
// | |
//After reading the original post [http://jboner.github.com/2008/10/06/real-world-scala-dependency-injection-di.html, ] | |
//the original cake pattern seems quite verbose for me, and it is quite invasive, so I spent a bit time | |
//and come up with an improved version of cake pattern, which I call it "Auto Cake DI". It is working | |
//well with any POST(plain old scala trait)/POSO(plain old scala object) which means that anything can be | |
//injected without modification or introducing new traits. | |
/*---------inject trait---------*/ | |
trait Inject[+T] { def inject: T } |
An exceptionally handsome way to track your Stack Overflow badges.
Note: Badge Overflow now works with all Stack Exchange sites.
Created by Adam & Stephanie Sharp.
A Dashing widget that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove current lxc version which is lxc/1.0.0~alpha1-0ubuntu11 | |
sudo apt-get remove lxc | |
# Download the new pakcages with the updated | |
wget https://launchpad.net/ubuntu/+source/lxc/1.0.0~alpha1-0ubuntu12/+build/5171688/+files/lxc_1.0.0~alpha1-0ubuntu12_amd64.deb | |
wget https://launchpad.net/ubuntu/+source/lxc/1.0.0~alpha1-0ubuntu12/+build/5171688/+files/liblxc0_1.0.0~alpha1-0ubuntu12_amd64.deb | |
# Install the updated packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Everytime I clone a new GIT repo I always forget to set the user information to the specific values (privat, company, whatever) | |
# This entry in my .gitconfig prevents commiting as long I have not edited the local .git/config | |
# | |
# This workaround is based on the following stack-overflow question: http://stackoverflow.com/a/25050535 | |
[user] | |
email = (none)\n\n\n====================================\n!!! E-MAIL NOT SET FOR THIS REPO !!!\n!!! Specify your name and e-mail !!!\n====================================\n\n\n | |
name = Firstname Lastname | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this package is mostly copy-pasted from golang's std container/heap | |
// I changed Interface, Pop and Push in order to get rid of type assertions | |
// usage can be found in test file, benchmarks show that we can get about 27% of speedup for 1000 elems, or 10% for 10M elems (tested on go1.4) | |
package gheap | |
type Interface interface { | |
Len() int | |
Less(i, j int) bool | |
Swap(i, j int) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.sonatype.nexus.repository.storage.Asset | |
import org.sonatype.nexus.repository.storage.Query | |
import org.sonatype.nexus.repository.storage.StorageFacet | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def request = new JsonSlurper().parseText(args) | |
assert request.repoName: 'repoName parameter is required' | |
assert request.startDate: 'startDate parameter is required, format: yyyy-mm-dd' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function ask_gpt() { | |
PROMPT=$(gum input --width 80 --placeholder "prompt") | |
if [[ -z "$PROMPT" ]]; then | |
exit 0 | |
fi | |
gum style --foreground 212 "> $PROMPT" |
OlderNewer