This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define MAX_DATA_LEN 1024 | |
static unsigned char hex_string[MAX_DATA_LEN]; | |
static inline char convert_to_printable(char c) | |
{ | |
return c < 32 || c > 126 ? '.' : c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
source ~/.bashrc_work > /dev/null 2>&1 | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from shapely.geometry import Polygon, MultiPolygon | |
from shapely.ops import polygonize | |
import numpy as np | |
from skimage import draw, io | |
img = np.zeros(shape=(600, 600, 3), dtype=np.uint8) | |
coords = np.array([[20, 20], [20, 400], [400, 20], [400, 400]], dtype=np.int32) | |
p = Polygon(coords) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pacman -U http://archlinux.arkena.net/archive/packages/e/elfutils/elfutils-0.174-1-x86_64.pkg.tar.xz http://archlinux.arkena.net/archive/packages/l/libelf/libelf-0.174-1-x86_64.pkg.tar.xz | |
sudo pacman -U http://archlinux.arkena.net/archive/packages/b/binutils/binutils-2.30-5-x86_64.pkg.tar.xz | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd $(dirname $(readlink -f $0)) | |
mkdir -p build/install | |
cd build | |
# on archlinux install: | |
# pacman -S gcc-fortran intel-tbb openblas cblas lapack lapacke eigen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//eos3 | |
flatpak remote-add --user eos-apps --no-gpg-verify https://ostree.endlessm.com/ostree/eos-apps | |
flatpak install --user eos-apps com.google.Chrome | |
git clone [email protected]:endlessm/eos-google-chrome-app.git | |
cd eos-google-chrome-app | |
chmod +x eos-google-chrome-app | |
./eos-google-chrome-app | |
//master | |
flatpak remote-add --user --no-gpg-verify chrome http://blog.kukuh.syafaat.id/google-chrome-flatpak-repo-testing/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Kills VLC on resume in order to fix logging spam | |
[Service] | |
Type=oneshot | |
ExecStart=-/usr/bin/killall vlc | |
TimeoutSec=0 | |
StandardOutput=syslog | |
After=suspend.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass, fields as datafields | |
from ujson import dumps, loads | |
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json | |
@dataclass | |
class Point: | |
x: float | |
y: float | |
# Shallow dataclass can be rebuilt from dict/json: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
workgroup = WORKGROUP | |
server string = %h server (Samba, Ubuntu) | |
passdb backend = tdbsam | |
security = user | |
[public] | |
comment = MY_PASSPORT | |
path = /mnt/MY_PASSPORT/data/ | |
browsable = yes | |
create mask = 0660 |
OlderNewer