Skip to content

Instantly share code, notes, and snippets.

View baybatu's full-sized avatar
🏠
Working from home

Batuhan Bayrakci baybatu

🏠
Working from home
View GitHub Profile
@baybatu
baybatu / bamboo-history-cleaner.js
Created March 17, 2017 17:36
Delete Bamboo Build History
// by Bahtiyar Akbas :)
document.querySelectorAll('.deleteLink').forEach(function(e) {
var http = new XMLHttpRequest();
var url = e.href;
var params = 'atl_token='+getCookieValue('atl.xsrf.token');
http.open('POST', url, true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.onreadystatechange = function() {
console.log(http.status);
}
@baybatu
baybatu / xm-play-on-xmp.sh
Created May 6, 2017 15:11
Play *.xm files in xmp
find . -name '*.xm' -exec xmp {} \;
@baybatu
baybatu / tmux-selection-to-clipboard.md
Created April 17, 2017 13:04
Copy selection area into system clipboard in tmux for iTerm2
http://stackoverflow.com/a/38849483
@baybatu
baybatu / spring-boot-main-class-in-pom.xml
Created May 9, 2017 08:00
Telling to maven which class is the main class of a SpringBoot application
<!-- source:http://stackoverflow.com/a/23217203 -->
<properties>
<start-class>com.batuhanbayrakci.acayipApp.BiAcayipApplication</start-class>
</properties>
@baybatu
baybatu / pom.xml
Created June 13, 2017 17:06
Exclude directories from SonarQube reports
<!-- thanks to @umitunal -->
<properties>
...
<sonar.exclusions>
**/api/client/model/**/*,
**/api/client/request/**/*,
**/api/client/configuration/**/*
</sonar.exclusions>
</properties>
@baybatu
baybatu / spin_wait.js
Created July 14, 2017 18:10
a nice spin-wait example in js
// Source: https://stackoverflow.com/a/37575602
var waitTill = new Date(new Date().getTime() + seconds * 1000);
while(waitTill > new Date()){}
@baybatu
baybatu / insert-data-coming-from-select-query.sql
Created August 3, 2017 11:54
Populate a table with data coming via SELECT query
INSERT INTO order_summary (order_id, order_price)
SELECT o.id, o.price
FROM orders as o
@baybatu
baybatu / git-remove-branch.sh
Created August 29, 2017 08:47
remove git branch from local and remote
git push origin --delete BRANCH_NAME
git branch -D BRANCH_NAME
@baybatu
baybatu / xmp-installation.sh
Created September 4, 2017 05:42
xmp-cli installation with proper 'configure' parameters
# libxmp installed via brew
libxmp_LIBS=-L/usr/local/Cellar/libxmp/4.4.1/lib \
libxmp_CFLAGS=-I/usr/local/Cellar/libxmp/4.4.1/include \
./configure
sudo make install
@baybatu
baybatu / append-multiline-to-file.sh
Last active September 4, 2017 05:43
append multiline to file
cat << EOF >> ~/.zshrc
export PATH="$PATH:/my/fancy/app/path"
alias helehele="echo 'hele hele antepli'"
EOF