Skip to content

Instantly share code, notes, and snippets.

View Vlasterx's full-sized avatar
🛸
Working from mothership

vlasterx Vlasterx

🛸
Working from mothership
  • Belgrade, Serbia
  • 11:50 (UTC +02:00)
View GitHub Profile
@Vlasterx
Vlasterx / UnlikeTweets.js
Created July 30, 2020 07:07
Unlike tweets
setInterval(function () {
var divs = document.getElementsByTagName('div')
var arr = Array.prototype.slice.call(divs)
var hearts = arr.filter(x => x.getAttribute('data-testid') == 'unlike')
hearts.forEach(h => h.click())
window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight);
}, 1000);
@Vlasterx
Vlasterx / export-common.js
Created December 25, 2019 14:52
Export/Import reminder
module.exports = (option) => {
console.log('It works!', option)
}
@Vlasterx
Vlasterx / .bash_profile
Created May 31, 2019 16:22
Better bash look (user)
# Paste this into ~/.bash_profile
export PS1="\n\[$(tput sgr0)\]\[\033[38;5;27m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;63m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;6m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;8m\]>\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
@Vlasterx
Vlasterx / user-aliases.cmd
Created February 22, 2019 14:11
CMDER aliases
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --show-control-chars -F --color $*
pwd=cd
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@Vlasterx
Vlasterx / vue.js
Created July 2, 2017 18:41
Vue for Zurb Panini
/*
In order to use Vue with Zurb Panini, you need to put this file in /helpers/ folder.
After that, in your HTML use
{{#vue}} variable {{/vue}}
instead of this
{{ variable }}
*/
@Vlasterx
Vlasterx / print_r_reverse.php
Created February 28, 2017 19:12
print_r REVERSE
http://www.php.net/manual/en/function.print-r.php#93529
<?php
function print_r_reverse($in) {
$lines = explode("\n", trim($in));
if (trim($lines[0]) != 'Array') {
// bottomed out to something that isn't an array
return $in;
} else {
// this is an array, lets parse it
@Vlasterx
Vlasterx / installNodeJs.bash
Created October 18, 2016 16:02
Installing Node on Debian 8
wget https://nodejs.org/dist/v4.6.0/node-v4.6.0-linux-x64.tar.xz
tar -xJf node-v4.6.0-linux-x64.tar.xz && cd node-v4.6.0-linux-x64
cp ./bin/node /usr/local/bin/node
cp -r ./lib/node_modules /usr/local/lib/node_modules
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
cp -r ./include/node /usr/local/include
mkdir -p /usr/local/man/man1 && cp ./share/man/man1/node.1 /usr/local/man/man1/node.1