When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.
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
# Login via SSH with password (LOCAL SERVER) | |
> ssh brad@192.168.1.29 | |
# Create folder, file, install Apache (Just messing around) | |
mkdir test | |
cd test | |
touch hello.txt | |
sudo apt-get install apache2 | |
# Generate Keys |
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 os | |
import re | |
import sys | |
from subprocess import Popen, PIPE | |
ROOT_FILES_PATH = '/home/<username>/path/to/your/file' | |
# REgex | |
STATIC_REGEX = re.compile(r'mobile/(.*?)(\.css|\.js|\.svg|\.less|\.png|\.jpg|\.woff|\.ttf|\.eot|\.txt|\.scss)') |
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 os | |
import re | |
import sys | |
from subprocess import Popen, PIPE | |
ROOT_FILES_PATH = '/home/<username>/path/to/your/file' | |
# REgex | |
STATIC_REGEX = re.compile(r'mobile/(.*?)(\.css|\.js|\.svg|\.less|\.png|\.jpg|\.woff|\.ttf|\.eot|\.txt|\.scss)') |
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 os | |
import re | |
import sys | |
from subprocess import Popen, PIPE | |
ROOT_FILES_PATH = '/home/<username>/path/to/your/file' | |
# REgex | |
STATIC_REGEX = re.compile(r'mobile/(.*?)(\.css|\.js|\.svg|\.less|\.png|\.jpg|\.woff|\.ttf|\.eot|\.txt|\.scss)') |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
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 python3 | |
import json | |
import sys | |
from urllib import request | |
from datetime import datetime | |
from dateutil.tz import tzutc | |
from dateutil.parser import parse | |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
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 | |
#https://github.com/PythonicNinja/jetbrains-reset-trial-mac-osx/blob/master/runme.sh | |
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine Rider; do | |
echo "Closing $product" | |
ps aux | grep -i MacOs/$product | cut -d " " -f 5 | xargs kill -9 | |
echo "Resetting trial period for $product" |