Skip to content

Instantly share code, notes, and snippets.

View chexov's full-sized avatar

Anton P. Linevich chexov

  • Los Angeles
View GitHub Profile
US bastion key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD0WV+jsPD2nvPCDfZi+M6n5iWz6mla+Gg3qKXSXEFtZRU1/LcmTZyPqZ57f5/LQdpFyDvKXAkEuPONO95vp3Rt4w6Lju3ylqD1l+cF1OekTRnqNacq7v0drh61rSDWtGb6vT+5c+ICSQVl5zAJsZjmqXc6Hc6aHhjuPNUKSoK+MjV59s0NaQDnXBHm2SHzA6dB0N86V5toY8gJFfRrbeZ4qhyeQn1efld6+GZQfEwMeKWwnMAc6f9zZSZKC7Gd6DI3gh4wz+smAB5QmiPBDLpsFHY2B0DsymW70tMIATRi6gH/mRcymtX22aUFrnqj2EpYoZdZyHtKRc2mT8ibY207 ubuntu@LinuxBastion
EU bastion key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCc4B1REDmvBeDLizxrjzoPm+0YYDlrHJZJ6duqyw7b4bp454O0PYTXhJasJTqrFMGc1m3EME/KGSguyzoqfhSndyFrj4XG5nVqVjJ079+XkZktSrY5bOXbVBzktrRmgEU7OBRtafrpyop+Ww6DE/WNoJROLFuhxzS73BOWhuT+kiD/QrbgB8G6fiVeiCmfaHNBwJ3cS8hjqJJHy6jqvT6Px3xP7DyO2igSg+bO9VZ4ZSzCqc/FkHvdk9dSxP1GYslJwkrI2Jolmvnr7DolPYK4UOdnt0Seuv2i55YCOXbKrpi+c5qLnicHLtazSCNFRpzSAojskx0M1mIwb0bNNSG9 anton@ip-10-3-26-229
@chexov
chexov / uno.sh
Last active December 27, 2015 14:19
Shell Q/A
printf "What is the difference between two scripts?\n"
printf "Why x1 and x2 variables have different end values\n"
x1=1
for f in `ls /etc/`; do
echo "file is $f"
(( x1 += 1 ))
done
echo "x1=$x1"
@chexov
chexov / README
Last active December 30, 2015 11:59
Techlogger API example
= List of proxies =
GET http://localhost:8080/api/metadata
= Logging Metadata Events for "Textless matching" track =
GET http://localhost:8080/showxml?movieId=fifthelementthe_1997_hd_16x9_240_2398_english_69_JPEG2000&format=json&track=Textless%20matching.csv
= Frame Match data for fifthelementthe_1997_hd_16x9_240_2398_english_69_JPEG2000 proxy =
GET http://localhost:8080/api/framematch/fifthelementthe_1997_hd_16x9_240_2398_english_69_JPEG2000/fifthelementthe_1997_hd_16x9_240_2398_english_69_JPEG2000
{
"storedDim": {
"width": 1920,
"height": 1080
},
"displayDim": {
"width": 1920,
"height": 1080
},
"timescale": 24000,
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA1A8XlSyXeZgThwa05OeVGBwA3Y3tFmJ6jkx2uS4nNisPzqEYtcgCeB681xZct/P/2omg1W8ki5gy44IAsBDVfpBiuTP2jwFD5iSMhZS+JOII/syWiyYHJBCfzMMmpZuUwDZwVQQlyEmZ350BG4IhPt1wxLvsnOD+cv6VY2XESSc= [email protected]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRtfKWrWkHB8d1CFkv5c1K/RxftIjRaTYeQqAm3x+5E5efJ75XJ5S1dv214YQ3Ia52IzFsYrwFH6IZ2KR7spjUfop/KTOZ4n3J8etf8Ic1BW3X23sRqcT1whLs1SqrZgPiX10vtoBvBlM6CIr9njjgNwQ7A3Zi3nFbu1Mid+ZP+ImzA2Oq2oZCkPB8Iz0Sx+YQA85Fh2pCRExbqcsf1zWlvItiPocpVxnh5dA1HpertL5308Pm8QbOl+JSbky8qj1VJLc3sU7B0m9mNGIRzr3/OrK9LmADEnvWnb7gZcQasEN08JkO+amYKcVXmInoXzIM8EYhY0ykhvoZvUThs+3L [email protected]
@chexov
chexov / gist:abf3c307c6af284b51c2
Last active August 29, 2015 14:03
is dir growing
isGrowingDU() {
local dir=$1
before=`du -sL "$dir" | awk '{print $1}'`
sleep 2
after=`du -sL "$dir" | awk '{print $1}'`
return $((after - before))
}
isGrowingDU "${in_folder}" || { echo "$id is growing. skip."; continue; }
@chexov
chexov / trim-enabler.sh
Created August 28, 2014 16:20
trim enabler
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
#!/bin/sh
cd /
umount /pref
echo 3 > /proc/sys/vm/drop_caches
#wifi mode is specified
if [ "${1}" == "ap" ]; then
echo -e "\nPress CTRL+C now if you want to skip hibernation"
echo "killall hostapd"
killall hostapd
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'