I hereby claim:
- I am ivuorinen on github.
- I am ivuorinen (https://keybase.io/ivuorinen) on keybase.
- I have a public key whose fingerprint is 2ACD 5CFD 6298 A83B 16D9 DBCD 7D19 3B92 F274 2794
To claim this, I am signing this object:
User-agent: * | |
Disallow: / |
#!/bin/bash | |
# Ismo Vuorinen <ismo@ivuorinen.net>, 2014 | |
SCRIPTNAME=`basename $0` | |
# If no directory is given, work in local dir | |
if [ "$1" = "" ]; then | |
DIR="." | |
else | |
DIR="$1" |
<?php | |
/** | |
* makeSafeEntities() | |
* | |
* Convert str to UTF-8 (if not already), then convert that to HTML named | |
* entities and numbered references. | |
* Compare to native htmlentities() function. Unlike that function, | |
* this will skip any already existing entities in the string. | |
* | |
* - mb_convert_encoding() doesn't encode ampersands, so use |
I hereby claim:
To claim this, I am signing this object:
/** | |
* sleep(1000).then(function () { console.log('zzZZzzZZ...'); }); | |
* | |
* @author gsamaras <https://stackoverflow.com/a/951057/594940> | |
* @param {Integer} ms | |
* @returns {Promise} | |
*/ | |
window.sleep = function sleep(ms) { | |
return ( | |
new Promise(function (resolve, reject) { |
#!/usr/bin/env bash | |
# Laravel Homestead | |
# Enable xdebug on all PHP versions (cli) | |
# Best place for this is in the user-customizations.sh in the Homestead folder | |
PHPV=$(ls /etc/php/) | |
for i in ${PHPV[@]}; do | |
if [ ! -f /etc/php/$i/cli/conf.d/20-xdebug.ini ]; then | |
sudo ln -s /etc/php/$i/mods-available/xdebug.ini /etc/php/$i/cli/conf.d/20-xdebug.ini | |
fi |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>heartrain</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script> | |
if(!image_urls) { | |
var image_urls = Array() | |
} | |
if(!flash_urls) { |
# Remove files from your specified path. | |
git filter-branch --force --index-filter 'git rm --cached -r --ignore-unmatch dir/with/large/files/*' --prune-empty --tag-name-filter cat -- --all | |
rm -rf .git/refs/original/ && git reflog expire --expire=now --all && git gc --prune=now && git gc --aggressive --prune=now |
#!/bin/bash | |
# Swapfile generator | |
# | |
# Copyright 2019 Ismo Vuorinen <ismo@ivuorinen.net> | |
# Licensed under MIT <https://opensource.org/licenses/MIT> | |
_err () { | |
echo "(!) Error: $1" >&2; exit 1 | |
} |
#!/bin/sh | |
for image in $(/usr/bin/docker images -q -f dangling=true); | |
do | |
/usr/bin/docker rmi $image; | |
done | |
for volume in $(/usr/bin/docker volume ls -qf dangling=true); | |
do | |
/usr/bin/docker volume rm $volume; |