Skip to content

Instantly share code, notes, and snippets.

View StoneLabs's full-sized avatar
:shipit:
Oh hello there

Levy StoneLabs

:shipit:
Oh hello there
View GitHub Profile
@StoneLabs
StoneLabs / rodos_setup.sh
Last active May 19, 2020 17:36
Rodos quick setup
#!/bin/bash
### Script to quickly install Rodos in current working directory
### as well as add and compile an hello world program.
### RODOS INSTALL
git clone https://gitlab.com/rodos/rodos
if [ ! -d rodos ]; then
exit 1
fi
@StoneLabs
StoneLabs / notebook.nb
Last active August 5, 2021 16:24
Mathematica accumulative event propability graph
discreteColors = Function[n,
colors = With[{partL = Ceiling[Sqrt[n]]},
DeleteCases[
Flatten[Transpose[
Partition[
Table[ Lighter[Darker[Hue[c], .1], .25], {c, 0, 1 - 1/n, 1/n}
], partL, partL, 1, 0]
]]
, 0]
];
@StoneLabs
StoneLabs / main.ps1
Last active June 24, 2020 13:16
Add or Remove Windows Packages via PowerShell
# List installed packages
Get-AppxPackage -AllUsers | Select Name
#Remove specific package (e.g. Microsoft.WindowsStore)
Get-AppxPackage -AllUsers Microsoft.WindowsStore | Remove-AppxPackage -AllUsers
#Reinstall specific package (e.g. Microsoft.WindowsStore
Get-AppxPackage -AllUsers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_InstallLocation)\AppXManifest.xml"}
@StoneLabs
StoneLabs / list.txt
Last active July 9, 2020 15:17
Predictive WiFi Propagation Papers
https://www.researchgate.net/publication/239826121_Prediction_of_Wireless_Network_Signal_Strength_within_a_Building
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiP-_mR6JrqAhWhy6YKHdzQCGYQFjADegQIBBAB&url=https%3A%2F%2Fwww.mdpi.com%2F2079-9292%2F8%2F3%2F286%2Fpdf&usg=AOvVaw3hPTIRuxnEBxrhJeyDTvH-
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5713621/
@StoneLabs
StoneLabs / Program.cs
Created August 16, 2020 11:04
.NET Tray Icon Week of year applet
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Globalization;
namespace WeekNumber
{
static class Program
{
@StoneLabs
StoneLabs / circle.py
Last active October 8, 2023 07:07
Factorio Circle Blueprint Generator
print("Please make sure py_factorio_blueprints is installed (pip install)")
print("Please make sure https://github.com/tzwaan/python-factorio-blueprints is cloned in this directory")
from py_factorio_blueprints.blueprint import Blueprint
print("\nEnter radius: ", end="")
radius = int(input())
print("Enter Thickness: ", end="")
thickness = int(input())
print("\nGenerating Circle...")
@StoneLabs
StoneLabs / adb.txt
Last active September 21, 2020 18:40
Usefull ADB commands
All commands are inside adb shell:
List packages
pm list packages -f | sed -e 's/.*=//' | sort
Uninstall package for user
pm uninstall --user 0 com.google.android.youtube
Upload file
adb push -p ./boot.img "//storage/emulated/0/Download/"
@StoneLabs
StoneLabs / gist:353999c6ea7c95646aaf72f32ee57bf0
Created October 8, 2020 13:47
Resources for creating USB device
https://github.com/kmani314/ATMega32u4-HID-Keyboard
https://github.com/MouChiaHung/STM32F4
https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/implement-driver-entry-for-a-usb-driver--umdf-
@StoneLabs
StoneLabs / prompt.bat
Created October 18, 2020 12:32
.bat masked password promt
@echo off
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
echo %password%
@StoneLabs
StoneLabs / .gitconfig
Created November 13, 2020 10:01
Git Aliases
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ignored = !git ls-files -v | grep "^[[:lower:]]"
ls = !git ls-tree "$(git symbolic-ref --short HEAD)"