Skip to content

Instantly share code, notes, and snippets.


Raffi Khatchadourian khatchad

View GitHub Profile
git pull upstream master # upstream set to
git mergetool --gui path # to resolve conflicts
git co --thiers path # to take theirs
git add path # to take theirs
git rm -r path # for files they removed

Jack, a primary school teacher

Jack, age 32, is a primary school teaching ...


Fishing in Ullapool

Jack is a primary school teacher in Ullapool, teaching P6 pupils. He has decided that a class project ...

khatchad /
Created Jan 14, 2021
MySQL backup script
DATABASES=("skeletal_implementers" "phpmyadmin" "skeletal_implementers_abstract_only")
khatchad /
Created Nov 23, 2020
Converts doc files to GitHub flavored markdown in ASCII
/usr/bin/pandoc "$INPUT" -t gfm --wrap=none | /usr/bin/uni2ascii -B > "$OUTPUT"
View gist:93533192b4ea89eb67bd0ef8d217bb45
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon (TM) Pro WX Series (POLARIS11, DRM 3.33.0, 5.3.0-29-generic, LLVM 9.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.8
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.2.8
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
khatchad / perf.patch
Last active Aug 21, 2018
Conversion of JUnit tests to JMH tests for java-design-patterns
View perf.patch
diff --git a/abstract-document/src/test/java/com/iluwatar/abstractdocument/ b/abstract-document/src/test/java/com/iluwatar/abstractdocument/
index b6467e232..aef824817 100644
--- a/abstract-document/src/test/java/com/iluwatar/abstractdocument/
+++ b/abstract-document/src/test/java/com/iluwatar/abstractdocument/
@@ -23,11 +23,18 @@
package com.iluwatar.abstractdocument;
import org.junit.Test;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Level;
View integers.cpp
#include <iostream>
#include <climits>
using namespace std;
int main() {
int i;
int j;
int result;
cout << "Enter i: ";
View integers.cpp
#include <iostream>
#include <climits>
using namespace std;
int main() {
int i;
int j;
int result;
cout << "Enter i: ";
khatchad / mann-whitney.r
Created Nov 13, 2017
R script to generate the Mann-Whitney statistical analysis for our pull request study
View mann-whitney.r
changed_files_non_merged <- c(1, 5, 6, 16, 16, 22, 23, 29, 51, 135)
changed_files_merged <- c(2, 4, 4, 21)
changed_lines_non_merged <- c(22,27,62,729,681,283,161,413,922,2528)
changed_lines_merged <- c(23,53,441,526)
concrete_non_merged <- c(1,1,0,0,0,0,1,0,0,0)
concrete_merged <- c(0,1,0,0)
KLOC_non_merged <- c(25,7,20,309,244,136,154,329,1266,506)
khatchad /
Created Feb 23, 2017
Find out if a object creation instruction produces an instance with the given instance key in WALA
* True iff the given {@link InstanceKey} corresponds with the given
* {@link SSAInvokeInstruction} in the given {@link CallGraph}. In other
* words, the result is true iff the instruction is used to create the
* instance.
* @param instanceKey
* An instance in question.
* @param instruction
* An instruction in question. Should be corresponding to a ctor