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
  • 22:35 (UTC +02:00)
View GitHub Profile
@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 }}
*/
# 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 ->
<!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">
@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
@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 / export-common.js
Created December 25, 2019 14:52
Export/Import reminder
module.exports = (option) => {
console.log('It works!', option)
}
@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 / table2json.js
Created April 1, 2021 13:11
HTML table to JSON
/**
* Recursive function that parses table elements
*
* @param elHtml - HTML object that contains table
* @returns { Object } JSON element with parsed table
*/
const parseTable = (elHtml = null) => {
if (elHtml === null) { return false }
let elName = String(elHtml.nodeName).toLowerCase()
@Vlasterx
Vlasterx / delete-linkedin-posts.js
Last active March 12, 2025 08:33
Delete all LinkedIn posts version for June 2021.
(() => {
let speedMs = 500
setInterval(() => {
let dropdown = document.querySelector('.feed-shared-update-v2__control-menu .artdeco-dropdown button')
dropdown.click()
setTimeout(() => {
let optionDel = dropdown.parentElement.parentElement.parentElement.querySelector('.option-delete .tap-target')