Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/bin/bash | |
#set -x | |
#set -e | |
k3d delete --name='k3s-default' | |
k3d create --workers 1 --image rancher/k3s:v0.8.1 && | |
declare -i i; i=0 | |
until k3d get-kubeconfig --name='k3s-default' | |
do | |
if (( i > 20 )); then | |
break |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;
gcc -DgitSHA="$(git rev-parse HEAD)" main.c |
package main | |
import ( | |
"log" | |
"encoding/json" | |
"fmt" | |
"os" | |
"math/rand" |
// A small SSH daemon providing bash sessions | |
// | |
// Server: | |
// cd my/new/dir/ | |
// #generate server keypair | |
// ssh-keygen -t rsa | |
// go get -v . | |
// go run sshd.go | |
// | |
// Client: |
# coding=utf-8 | |
""" | |
author = Mateor | |
PYTHON 3.3.5 | |
""" | |
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, | |
print_function, unicode_literals) |
1. Execute make first. This will result in a netlinkKernel.ko output among many others. | |
2. Execute $ gcc netlinkUser.c -o netlinkUser | |
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko | |
4. Run ./netlinkUser to see message and run dmesg to see debug messages | |
5. Remove module by : $ sudo rmmod netlinkKernel | |
6. Finally make clean to remove output files. |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.