As configured in my dotfiles.
start new:
tmux
start new with session name:
/* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon | |
* http://j.mearie.org/post/1181041789/brainfuck-interpreter-in-2-lines-of-c */ | |
s[99],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c&2,b=c%7?a&&(c&17 | |
?c&1?(*r+=b-1):(r+=b-1):syscall(4-!b,b,r,1),0):v;b&&c|a**r;v=d)main(!c,&a);d=v;} |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
# URI of the local (caching) HTTP proxy | |
LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123' | |
# Configures vagrant-cachier and vagrant-proxyconf. | |
# Should be called only on "local machine" providers. | |
def configure_caching(config) | |
if Vagrant.has_plugin?('vagrant-cachier') | |
config.cache.enable_nfs = true | |
config.cache.enable :gem | |
config.cache.enable :npm |
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
OpenShift WEDOS domain updater | |
============================== | |
This script makes sure that your main domain (example.org) resolves to the | |
same IP address as your WWW domain (www.example.org). When you run your | |
webapp on OpenShift, you should set CNAME DNS records, however, this is not | |
possible for main domains, such as example.org without a subdomain. |
Základní systemd utility: | |
systemctl # správa systému a služeb | |
journalctl # správa systemd journalu (logu) | |
loginctl # správa systemd logind | |
hostnamectl # vypsání a změna hostname | |
localectl # vypsání a změna locale a klávesnice | |
timedatectl # vypsání a změna času a data | |
busctl # práce s D-Bus busem | |
Základní typy unit: |
// How to download telegram sticker images | |
/* | |
1. Go to Telegram Web; | |
2. Open console (F12); | |
3. Paste the code below in the console and press Enter; | |
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it). | |
5. At the console paste and run "downloadStickers()" any time you want to download a pack. | |
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/); | |
7. Happy hacking. |
#!/usr/bin/env bash | |
# | |
# Author: Markus (MawKKe) ekkwam@gmail.com | |
# Date: 2018-03-19 | |
# | |
# | |
# What? | |
# | |
# Linux dm-crypt + dm-integrity + dm-raid (RAID1) | |
# |