Skip to content

Instantly share code, notes, and snippets.

View soygul's full-sized avatar

Teoman Soygul soygul

View GitHub Profile
sudo lsof -iTCP -sTCP:LISTEN -n -P
soygul /
Last active October 30, 2018 14:52
Android local service binding - code snippet
* Local service binding *
private final IBinder binder = new WorkerServiceBinder();
* Returns an instance of this service so binding components can directly call public methods of this service.
public class WorkerServiceBinder extends Binder {
soygul /
Created October 2, 2018 08:29
Encrypt/Decrypt Files Using OpenSSL
# encrypt
openssl enc -in test.txt -aes-256-cbc -pass pass:mypass -out test.txt.enc
# decrypt
openssl enc -in test.txt.enc -d -aes-256-cbc -pass pass:mypass -out test.txt
# valid password sources (as of OpenSSL 1.1.1, see 'man openssl' for more recent info):
# -pass pass:mypass
# -pass env:somevar
# -pass file:somepathname
soygul / youtube-upload.js
Last active July 13, 2024 08:08
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at:
// You can find the brief written guide at:
// Upload code is adapted from:
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');