Skip to content

Instantly share code, notes, and snippets.

View nejads's full-sized avatar

Sorosh nejads

View GitHub Profile
@shytikov
shytikov / commit-msg
Created July 17, 2012 21:07
commit-msg hook script
#!/bin/sh
#
# Automatically adds branch name and branch description to every commit message.
#
NAME=$(git branch | grep '*' | sed 's/* //')
DESCRIPTION=$(git config branch."$NAME".description)
TEXT=$(cat "$1" | sed '/^#.*/d')
if [ -n "$TEXT" ]
then
@kpiwko
kpiwko / Own DSL.java
Created May 20, 2013 15:27
Various approaches to test REST like API with Arquillian
@Test
public void registerPushApp() throws Exception {
HttpResponse response = Requests.post().uri(root, "rest/applications").accept("application/json")
.json(new JSONObject().put("name", "MyApp4").put("description", "awesome app v4")).execute();
assertThat(response, is(not(nullValue())));
assertThat(response.getStatusLine(), is(not(nullValue())));
assertThat(response.getStatusLine().getStatusCode(), is(200));
@rxaviers
rxaviers / gist:7360908
Last active July 27, 2024 17:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ragklaat
ragklaat / SystemOutTest.java
Created September 24, 2014 08:29
JUnit test for methods writing to OutputStream
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class SystemOutTest {

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?