Skip to content

Instantly share code, notes, and snippets.

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

Barış Esen barisesen

🏠
Working from home
View GitHub Profile
@juniorhero
juniorhero / matlab code gamma transformations
Created August 26, 2016 20:20
matlab code gamma transformations
a=imread('Penguins.jpg');
subplot(2,2,1);
imshow(a);
title 'Original Image';
b=im2double(a);
a1=input('enter value a');
ga1=input('enter value gamma');
s=(a1*(b.^ga1))*256;
s1=uint8(s);
@danharper
danharper / demo.md
Last active January 20, 2024 16:09
Open native Maps apps on iOS and Android in Cordova
iOS (with pin, iOS will lookup address too and show that as label)
maps://?q=LAT,LNG
Android, no pin (just open at location)
geo:LAT,LNG
@tleish
tleish / mysql_backup.sh
Last active June 22, 2025 13:50
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@chrismccoy
chrismccoy / gitcheats.txt
Last active September 30, 2025 18:28
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# delete all git history and keep current as the first commit (this will remove all git history, be careful)
git reset --soft $(git rev-list --max-parents=0 HEAD) && git commit --amend -m "Initial commit" && git push --force
# transfer all git repos from one org to another org
gh repo list {orgname} --limit 300 --json nameWithOwner -q '.[].nameWithOwner' | xargs -I {} gh api --method POST repos/{}/transfer -f new_owner={neworg}
@punkbit
punkbit / javascript
Last active March 11, 2024 17:00
Facebook Javascript SDK: Basic Login and Logout example
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: 'xxxxxxxxxxxxx',
status: true,
cookie: true,
xfbml: true
});