Skip to content

Instantly share code, notes, and snippets.

View neolite's full-sized avatar
💭
I may be slow to respond.

Rafkat Galiullin neolite

💭
I may be slow to respond.
View GitHub Profile
@neolite
neolite / create-swap
Last active August 29, 2015 14:12 — forked from li9ht/create-swap
#!/bin/sh
cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
sysctl -w vm.swappiness=30
free
//Vk replace all images on timeline to placeholders
// extends nodelist for foreach
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach;
// find & replace images
function vk_replace_img(selector,placeholder,src=null) {
document.querySelectorAll(selector).forEach(function(el) {
// console.log(el.src);