Skip to content

Instantly share code, notes, and snippets.

View sorja's full-sized avatar
🥰

Miró Sorja sorja

🥰
View GitHub Profile
@sorja
sorja / Fusion
Created July 19, 2017 17:08
Merge a rar file inside of an JP*G file
@echo off
color 0c
cd C:\
if exist FUSION goto FUSIONTRUE
mkdir C:\FUSION
:FUSIONTRUE
cd C:\FUSION
cls
echo.
echo.
@sorja
sorja / .eslintrc
Created July 19, 2017 17:14
Modified AirBnB's eslintrc to fit my needs (and my eyes 2560x1600 15" or 13") 7/2017
// OFF = 0
// WARN = 1
// ERROR = 2;
{
"env": {
"browser": true,
"node": true,
"es6": true
},
@sorja
sorja / .bash_aliases
Created July 25, 2017 19:04
Some often used bash aliases, for sync
# ...because lsd?
alias lsd='ls -d */'
alias l='ls -a'
alias gcl='git clone'
alias ga='git add'
alias grm='git rm'
alias gap='git add -p'
alias gm="git merge"
alias g='git'
@sorja
sorja / .bashrc
Last active March 25, 2018 16:58
Launch google chrome (canary) without web security, using custom profile. This example is missing the (optional) piping of output to /dev/null
# Append to .bashrc, .bash_profile or other similar
# Open google chrome canary without web security, and with devtools defaulting to open, using dev profile
function chromex() {
local chrome_canary="/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
# chrome://version/
local user_data_dir="$HOME/Library/Application Support/Google/Chrome Canary"
# Each profile is a subdirectory (often Default) within the user data directory.
local profile_path="Profile 1"
"$chrome_canary" --args --disable-web-security --user-data-dir="$user_data_dir" --profile-directory="$profile_path" --auto-open-devtools-for-tabs "$*"
@sorja
sorja / cloudSettings
Last active July 15, 2018 13:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-07-15T13:43:50.331Z","extensionVersion":"v3.0.0"}
@sorja
sorja / javascript:...
Last active May 18, 2018 19:50
Bored
You can run this in url bar, ex.
1. go to
about:blank
2. go to
javascript:(function(){ const _ = s => s.split('').map(c => String.fromCharCode(c.charCodeAt() + 1337)).join(''); eval(_("שׁזּוּךּכּ﫧גּ﫧ffl﫧ךּ﫧fflſt﫧ךּ﫵ךּ﬷דּאּכּ﫯﫮﫮﫰﫵הּﬨ﬷﫯שׁ﫧fflſt﫧﬚כּיּאּוּאַ﫵שּׂיּזּהּ﬊אָﬨיּ﬊זּשׂשּׁ﫯שׁ﫵שׁאָﬨיּ﬊זּשׂשּׁ﬈כּ﫯﫰﫧﫴﫧﫯﭅כּיּלּשּׁ﫧ſtſtſt﫧﭅שּׂﬨדּךּשּׁ﫰﫰﫰﫵בּזּאּוּ﫯﫮﫮﫰fl𣏕𢡄ךּשּׁדּשּׂﬢגּ﫯﫩שּׁ﬷שׂ﬽וּשּׂזּלּ﫩﫰ﬤﬢגּ﫯﫩שּׁ﬷שׂ﬽וּשּׂזּלּ﬍הּשּׂוּשּׂזּלּ﫩﫰ﬤﬢגּ﫯﫩כּשּׂלּ﬉לּלּךּבּשׁ﬽לּשּׂ﫩﫰ﬤ﫯גּ﫯﫩שׂ﬷זּלּשּׂזּלּשּׂשּׁבּלּ﬩שׁהּשּׂ﫩﫰﫳﫧﫩﫩﫰𣏕𢡄שּׁ﬽ﬨדּ﫯גּ﫯﫮שׂ﬷זּכּ﬷הּשּׂ﫶הּ﬷אָ﫰﫯﫭שׂ﫨ײַשּׂהּהּ﬇﫩﫨﫯﫴﫨﫯שׁ﬩שׂדּאָךּ﬷﬽זּשּׁfl﫨﫫﫻﫻﫻ffi﫨שׂ﬷הּ﬷ךּfl﫨﫫שׂ﫼שׂ﫯﫱ffi﫮﫰﫰𣏕𢡄ךּשּׁדּשּׂﬢגּ﫯﫩שּׁ﬷שׂ﬽וּשּׂזּלּ﫩﫰ﬤﬢגּ﫯﫩﬿ךּבּלּשּׂ﫩﫰ﬤ﫯גּ﫯﫩﬉ךּ﬍﫨סּﬗ﬽﫨לּ﬐שּׂ﫨﬐﬩﬋﫻﬚ﬕ﬩ﬖ﬇﫩﫰﫵ךּ﬷דּאּכּ﫯﫩﫩﫰﫵יּשּׁ﬽שּׁיּךּשּׁ﫯﫰﫵בּזּאּוּ﫯﫩﫩﫰﫰𣏕𣏕𢡄ךּשּׁדּשּׂﬢגּ﫯﫩שּׁ﬷שׂ﬽וּשּׂזּלּ﫩﫰ﬤﬢגּ﫯﫩﬿ךּבּלּשּׂ﫩﫰ﬤ﫯גּ﫯﫩fflשׁךּ﫨﫷st﫩﫰﫰𣏕𢡄שׁזּוּךּכּ﫧ךּשּׁשׁיּשּׁכּﬔ﫺ךּךּ﫻אַשּׁ﫧ffl﫧﫩הּ﬷הּ﫨וּ﬷בּ﫨אָגּ﫩𣏕𢡄ךּשּׁדּשּׂﬢגּ﫯﫩שּׁ﬷שׂ﬽וּשּׂזּלּ﫩﫰ﬤﬢגּ﫯﫩﬿ךּבּלּשּׂ﫩﫰ﬤ﫯ךּשּׁשׁיּשּׁכּﬔ﫺ךּךּ﫻אַשּׁ﫵יּשּׁ﬷שּׁﬨכּ﫯﫿﫷﫰﫰")) })();
3. Your browser might remove the javascript: part so you have to add it manually
@sorja
sorja / gt-swap.js
Created May 25, 2018 13:50
alt + x shortcut for google translate swap
// Not following best practices
(function () {
const d = document.getElementById,
a = window.addEventListener,
gt_swap = d('gt-swap'),
source = d('source');
a('keydown', function (e) {
if (e.altKey && e.code === "KeyX") {
source.disabled = true;
gt_swap.dispatchEvent(new MouseEvent('mouseover'));
@sorja
sorja / current-dir-in-iterm-tab-title.sh
Last active July 15, 2018 16:30 — forked from phette23/current-dir-in-iterm-tab-title.sh
Set the iTerm tab title to the current directory, not full path.
if [ $ITERM_SESSION_ID ]; then
DISABLE_AUTO_TITLE="true"
echo -ne "\033];${PWD##*/}\007"
fi
precmd() {
echo -ne "\033];${PWD##*/}\007"
}
@sorja
sorja / gmailAutoarchive.js
Created October 15, 2018 03:54
Automatic archiving of Gmail's emails which are labeled with 'autoarchive' or 'autoarchiveX' where 0 < X < 10.
function gmailAutoarchive() {
// Get all the labels
var labels = GmailApp.getUserLabels();
// Filter out the ones not containinig autoarchive
var autoarchive = labels.filter(function (label) {
var labelName = label.getName();
return labelName.indexOf("autoarchive") !== -1;
});
@sorja
sorja / exportTable.js
Last active February 17, 2020 11:20
Convert any kind of html table to matrix ( for CSV / JSON export ) without using external tools ( like jquery or cheerio )
// Inspiration/base from cheerio-tableparser
//
export const getData = (
tableElement,
dupCols = true,
dupRows = true,
textMode = true,
) => {
if (!tableElement) {