My Personal WeeChat Cheat Sheet
Requirements
You need at least WeeChat 3.2-dev
You need at least WeeChat 3.2-dev
pyenv
and python-build
pyenv
git clone git@github.com:pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
Frame pointer omission does make debugging significantly harder. Local variables are harder to locate and stack traces are much harder to reconstruct without a frame pointer to help out. Also, accessing parameters can get more expensive since they are far away from the top of the stack and may require more expensive addressing modes.
The -fno-omit-frame-pointer
option direct the compiler to generate code that maintains and uses stack frame pointer for all functions so that a debugger can still produce a stack backtrace even with optimizations flags.
Irrespective if you use the flag, not every function needs a frame pointer in the first place, so you can't always expect a difference with the flag.
Also, whether the function has a frame pointer is an implementation detail. Compilers can differ in implementation details (and usually they do).
import java.util.Stack | |
import java.lang.Long.parseLong | |
fun String.isNumeric(): Boolean { | |
return try { | |
parseLong(this) | |
true | |
} catch (e: NumberFormatException) { | |
false | |
} |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
[Unit] | |
Description=My service | |
[Service] | |
ExecStart=/usr/local/bin/my-service \ | |
-argument value \ | |
-otherargument othervalue | |
# Setuid/Setgid | |
User=nobody |
To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:
sudo usermod -aG systemd-journal $USER
(defn- normalize-verison | |
[version] | |
(let [[x y z] (map read-string (clojure.string/split version #"\.")) | |
z (or z 0)] | |
(+ (* x 10000) (* y 100) z))) | |
(defn version-compare | |
[a b] | |
(let [left (normalize-verison a) | |
right (normalize-verison b)] |
$ telnet-ssl -z ssl imap.gmail.com 993 | |
Trying 173.194.222.109... | |
Connected to gmail-imap.l.google.com. | |
Escape character is '^]'. | |
* OK Gimap ready for requests from 193.201.216.169 z8mb75199760ljk | |
a1 LOGIN xxxxxxxx@gmail.com my-password-here | |
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584 | |
a1 OK xxxxxxxx@gmail.com authenticated (Success) | |
a2 LIST "" "*" | |
* LIST (\HasNoChildren) "/" "INBOX" |
package main | |
import ( | |
"fmt" | |
"golang.org/x/net/context" | |
cc "golang.org/x/oauth2/clientcredentials" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) |