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
set nocompatible | |
call plug#begin('~/.vim/plugged') | |
" Plug 'MarcWeber/vim-addon-mw-utils' | |
Plug 'ekalinin/Dockerfile.vim' | |
Plug 'airblade/vim-gitgutter' " Shows a git diff in the gutter (sign column) and stages/undoes hunks | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'bronson/vim-trailing-whitespace' " Highlights trailing whitespace in red and provides :FixWhitespace to fix it | |
Plug 'christoomey/vim-tmux-navigator' " Seamless navigation between tmux panes and vim splits |
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/sh | |
rsync="/usr/bin/rsync" | |
################################ | |
# VARIABLES | |
################################ | |
# General Variables | |
backup_user="m" | |
source="/home/$backup_user" |
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 collections.abc import MutableMapping | |
class OpenStruct(MutableMapping): | |
"""A dictionary that applies an arbitrary key-altering | |
function before accessing the keys""" | |
def __init__(self, props={}, **kwargs): | |
""" | |
You can pass a dictionary or a list of kwargs and they get merged into a single object | |
""" |
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
#!/usr/bin/env bash | |
set -e | |
inotifywait -r -m $HOME/pics/ -e create | | |
while read path action file; do | |
if [[ "$file" =~ Untitled.png ]]; then | |
for i in {1..3}; do | |
echo -n "." |
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
#!/usr/bin/env bash | |
src=$(basename $1) | |
dest="hashed/${src}" | |
mkdir -p "$dest" | |
for fullfile in ${src}/*; do | |
filename=$(basename -- "$fullfile") |
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
import numpy as np | |
import os | |
import sys | |
import tensorflow as tf | |
import glob | |
from PIL import Image | |
from tensorflow_utils import label_map_util, ops as utils_ops | |
import cv2 | |
# from object_detection.utils import ops as utils_ops |
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
uri = URI("#{ODM}/task/new/upload/#{oid}") | |
request = Net::HTTP::Post.new(uri) | |
form_data = [ | |
['images', attachment.tempfile, { filename: attachment.original_filename, content_type: attachment.content_type }] | |
] | |
request.set_form form_data, 'multipart/form-data' | |
response = Net::HTTP.start(uri.hostname, uri.port) do |http| # pay attention to use_ssl if you need it | |
http.request(request) |
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
import math | |
import sys | |
import rasterio | |
from rasterio.warp import (calculate_default_transform, transform) | |
CHUNK_SIZE = 256 | |
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 -f alsa -i plughw:CARD=C525,DEV=0 -f video4linux2 -s 320x240 -i /dev/video0 -t 30 out.mpg |
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
clear | |
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole | |
cd Pi-hole/ | |
git branch | |
git checkout release/v4.3.2 | |
git branch -v | |
git fetch | |
git checkout release/v4.3.2 | |
git --version | |
git checkout origin release/v4.3.2 |
NewerOlder