Skip to content

Instantly share code, notes, and snippets.

View Marzogh's full-sized avatar
🏔️
Off the grid - as much as possible

Marzogh Marzogh

🏔️
Off the grid - as much as possible
View GitHub Profile
@Marzogh
Marzogh / getWinProdKey.vbs
Created July 19, 2019 11:58
Run this on Windows to get your product key
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
@Marzogh
Marzogh / Himawari8 earth imagery downloader.md
Created July 17, 2019 03:57
Various apps to download Himawari8 satellite's earth imagery

awesome-himawari8

This is a collection of a bunch of implementations of himawari8 live earth desktop in many languages.

The weather satellite Himawari8 posts its view of earth in every ten minutes. Therefore it is often used by the community to build live earth desktop scripts on. It is intersting to see how every implement the script in their favorite language. Also by comparing these scripts, similarities and differences between language can be found.

Among the list not only are there languages normally used for such task like Python and Ruby, but also Java, Haskel, Go, C#, Javascript(CoffesSript) and even Matlab.

Python

@Marzogh
Marzogh / Sync GitHub, Gitlab and BitBucket.md
Last active June 5, 2018 03:56 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
title tags authors
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
git
github
gitlab
bitbucket
MoOx
@Marzogh
Marzogh / bitmanipulation.cpp
Last active April 19, 2018 07:15
A list of macros that can be used to carry out bit manipulation
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Bit manipulation macros //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//Extract bytes from integers, floats & doubles
#define Lo(param) ((char *)&param)[0] //0x000y
#define Hi(param) ((char *)&param)[1] //0x00y0
#define Higher(param) ((char *)&param)[2] //0x0y00
#define Highest(param) ((char *)&param)[3] //0xy000
@Marzogh
Marzogh / arduino_serial.py
Last active January 25, 2023 16:32 — forked from ttmarek/arduino_serial.py
Python script to read serial data from the Arduino. Second file from (https://electronics.stackexchange.com/questions/54/saving-arduino-sensor-data-to-a-text-file)
import serial
import csv
import re
import matplotlib.pyplot as plt
import pandas as pd
portPath = "/dev/ttyACM0" # Must match value shown on Arduino IDE
baud = 115200 # Must match Arduino baud rate
timeout = 5 # Seconds
filename = "data.csv"
@Marzogh
Marzogh / ignore.md
Created March 1, 2018 04:09 — forked from tmaybe/ignore.md
ignoring merge conflicts for specific files in a git repository

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init
@Marzogh
Marzogh / README.md
Created March 1, 2018 04:08 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@Marzogh
Marzogh / ASCII Pinout_ATTiny13
Last active August 15, 2017 12:17
Ascii art pinouts for various DIP chips
+---\/---+
PB5 |1* 8| VCC
PB3 |2 7| PB2
PB4 |3 6| PB1
GND |4 5| PB0
+--------+

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@Marzogh
Marzogh / quit-terminal-cleanly-command
Created March 29, 2017 02:13
Add the following line to your .bash_profile, save and exit. (On iMacs you can access this by typing 'nano ~/.bash_profile' in terminal). This will let you close your terminal window with the one word command 'quit'
alias quit='osascript -e "do shell script \"osascript -e \\\"tell application \\\\\\\"Terminal\\\\\\\" to quit\\\" &> /dev/null &\""; exit'