Skip to content

Instantly share code, notes, and snippets.

View lserafin's full-sized avatar

Luzian Serafin lserafin

View GitHub Profile
@lserafin
lserafin / clean_code.md
Created November 15, 2020 12:35 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@lserafin
lserafin / TestAirlineOrg.json
Created November 13, 2019 12:35
Test ORG.ID on WT
{
"updatedAt": "2019-11-13T08:12:35.584Z",
"dataFormatVersion": "0.2.3",
"legalEntity": {
"name": "Example Airline PoC",
"contacts": {
"general": {
"email": "my-airline@example.com",
"phone": "+12345678",
"url": "https://airline.example.com"
Verifying my Blockstack ID is secured with the address 1FLex3cAHsedrhjtKSwbLRZAbY8kC7tXe7 https://explorer.blockstack.org/address/1FLex3cAHsedrhjtKSwbLRZAbY8kC7tXe7
# Install IIS
Install-WindowsFeature Web-Server -IncludeManagementTools
# Firewall
netsh advfirewall firewall add rule name="http" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="webdeploy" dir=in action=allow protocol=TCP localport=8172
# Create iis folder
New-Item -ItemType Directory c:\dotNetCoreIISRoot
0x83301974045eC024CABfC01515077A41D816ae1b
@lserafin
lserafin / hue.sh
Last active November 8, 2016 21:21
Simple shell script to switch Hue lights on/off from the command line using IFTTT
#!/bin/sh
## IFTTT Key
IFTTTKEY=[YOURKEY]
if [ "$1" = "on" ]
then
echo "Please wait a moment I will switch on the lights for you..."
curl -X POST https://maker.ifttt.com/trigger/lights_on/with/key/${IFTTTKEY}
elif [ "$1" = "off" ]
then
echo "Please wait a moment I will switch off the lights for you..."
@lserafin
lserafin / Simple HTTP Server from current folder
Created March 5, 2014 10:02
Start simple HTTP Server from current folder
python -m SimpleHTTPServer