Skip to content

Instantly share code, notes, and snippets.

View alptugan's full-sized avatar

alp tuğan alptugan

View GitHub Profile
@alptugan
alptugan / tezos_sign
Last active December 23, 2021 21:27
tezos gist
I am attesting that this GitHub handle alptugan is linked to the Tezos account tz1iRnhWqLBsmGX1XvsNoKcdnKzpDffsLn9n for tzprofiles
sig:edsigtm7RFcYJ72VzaUCdAMxRgpXd3jwnJFTiMM7aYUW1CSb7Cdv5u2XfQvaYQfQhfviUCjqQqasC1vuqQuoP7vC2yvMQXyzrZQ
youtube-dl --extract-audio --audio-format mp3 [video link]
# best audio with best video
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 'PASTE_YOUTUBE_URL'
void ofApp::setup()
{
image.load("img.jpg");
fbo.allocate(image.getWidth(), image.getHeight(), GL_RGBA,4); //GL_LUMINANCE depends on your GL version
fbo.begin();
ofClear(0,0);
ofDrawEllipse(100, 100, 200, 200);
fbo.end();
// Do the trick
@alptugan
alptugan / .bash_profile
Created March 14, 2019 20:18 — forked from lopespm/.bash_profile
Show git branch
# ---------------------------------------------------------------------------
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
An A-Z Index of the Apple macOS command line (OS X)
afconvert Audio File Convert
afinfo Audio File Info
afplay Audio File Play
airport Manage Apple AirPort
alias Create an alias •
alloc List used and free memory
apropos Search the whatis database for strings
asr Apple Software Restore
atsutil Font registration system utility
# 1- Generate Setup py
py2applet --make-setup your_app_name.py
# 2- To relase it as an app
python setup.py py2app -A
# 3- To relase it as an dist app
python setup.py py2app
# Alternative way with more options
```bash
#Show / hide hidden files
\!h CMD + Shift + .
```
```bash
#Take screeshot of whole desktop
\!h CMD + Shift + 3
```
@alptugan
alptugan / ptpd-tidal
Last active July 27, 2020 22:23
ptpd server installing and running on Super Collider and Tidal Cycles
## ptpd installation on Mac OS X HIGH SIERRA ##
#### update brew ####
``` $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null```
``` $ brew install automake```
``` $ brew install libtool```
``` $ brew install autoconf```
var scaleW = this.imgW / this.images[this.curId].width;
var scaleH = this.imgH / this.images[this.curId].height;
if(scaleW > scaleH) {
this.images[this.curId].height = this.imgH;
this.images[this.curId].scale.x = this.images[this.curId].scale.y;
}else{
this.images[this.curId].width = this.imgW;
this.images[this.curId].scale.y = this.images[this.curId].scale.x;
}
@alptugan
alptugan / tidal installation snippets
Last active August 16, 2018 22:26
Issues, installation, etc...
# re-installing Tidal
# 1- Uninstall haskell
# to see installed versions
$ uninstall-hs
$ uninstall-hs thru [current version of yours. DO NOT INCLUDE brackets] --remove
# 2- Instal Tidal again
$ cabal install tidal
# 3- check installed tidal components