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
{ | |
"basics": { | |
"name": "Yaron Shahrabani", | |
"label": "DevOps Engineer and Architect, Software localization expert", | |
"email": "[email protected]", | |
"phone": "+972-54-4209-674", | |
"summary": "Experienced DevOps Engineer and Tech Lead passionate about cloud infrastructure, automation, stability, redundancy and efficiency.", | |
"website": "https://github.com/yarons", | |
"location": { | |
"city": "Ma'agan Michael", |
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
# First replace SSID and PASS with yor Wi-Fi's SSID and password. | |
# The IP for the Webserver will appear in the console. | |
# In order to make the LED blink type the following | |
# in your Web Browser or curl: | |
# http://<esp32_ip>/blink=<amount> | |
# For example: | |
# http://192.168.1.50/blink=4 | |
import socket | |
from machine import Pin | |
from time import sleep_ms |
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
ACTION=="add|remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="XXXX", RUN+="/usr/bin/su YOUR_USER_NAME /path/to/refresh-genmon-udev.sh" | |
# replace YOUR_USER_NAME with your actual user name (hardcoded, this is ran by root, it's possible to determin your user name | |
# by finding out who is the owner of xfce4-panel | |
# You'll also have to replace XXXX with the output from lsusb | |
# for example: | |
# Bus 001 Device 094: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse | |
# After the term ID this is the code we're after, 046d is the idVendor code while c05a is the idProduct code | |
# Better have that hardcoded as well | |
# This file should be in /etc/udev/rules.d (at least on RedHat based and Arch based) and requires root permissions to edit. |
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 | |
adb shell dumpsys battery | grep level | sed "s@.*: @@" | |
#### Since it's a oneliner I would recommend adding it to the ~/.bashrc or ~/.bash_profile this way: | |
alias batt='adb shell dumpsys battery | grep level | sed "s@.*: @@"' | |
#### If you have many Android deviced connected to your computer you can specify which device to focus on, this way: | |
# First run: adb devices | |
# The ouptut should look like this: |
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
# save it as /etc/profile.d/ssh-telegram.sh | |
# use jq to parse JSON from ipinfo.io | |
# get jq from here http://stedolan.github.io/jq/ | |
USERID="<target_user_id>" | |
KEY="<bot_private_key>" | |
TIMEOUT="10" | |
URL="https://api.telegram.org/bot$KEY/sendMessage" | |
DATE_EXEC="$(date "+%d %b %Y %H:%M")" | |
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt' | |
if [ -n "$SSH_CLIENT" ]; then |
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
/************* | |
* lasers.js * | |
************* | |
* | |
* Time to unleash the killer lasers! Each laser will kill you | |
* unless you have the appropriate color. Too bad you can't | |
* see which color corresponds to which laser! | |
*/ | |
function getRandomInt(min, max) { |