Skip to content

Instantly share code, notes, and snippets.

#NoEnv
SetBatchLines, -1
#MaxHotkeysPerInterval 200
#Include <VA>
; Create the slider window
Gui, Add, Progress, w100 h20 x0 y0 Range0-100 vVolSlider, 0
Gui, Add, Text, w100 h20 x0 y0 vVolText BackgroundTrans Center +0x200, 0
Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Show, Hide w100 h20 x0 y0, Volume

Making a read-only ev3dev system

Mounting ev3dev.img

Start by downloading the latest ev3dev release from http://www.ev3dev.org/download/.

Once downloaded, set it up as a loop device. Find out what the first unused loop device is by running losetup -f. This tells you which loop device will be used once set up. On my system, it printed /dev/loop0. Now we can run the command to actually set up the loop device:

Array_Gui(Array, Parent="") {
if !Parent
{
Gui, +HwndDefault
Gui, New, +HwndGuiArray +LabelGuiArray +Resize
Gui, Margin, 5, 5
Gui, Add, TreeView, w300 h200
Item := TV_Add("Array", 0, "+Expand")
Array_Gui(Array, Item)
@G33kDude
G33kDude / mandelbrot_int.py
Last active October 23, 2016 01:07
Outputs an ASCII mandelbrot set representation without using floating point numbers.
#!/usr/bin/env python3
p = 999
s = 15
for py in range(21*s//10):
row = ''
for px in range(35*s//5):
x0 = (px-50*s//10)*p//s//2
y0 = (py-10*s//10)*p//s
x=0
@G33kDude
G33kDude / bf.ahk
Created October 21, 2016 23:35
BF Interpreter written in AutoHotkey
Tape := []
Inst := 1
Ptr := 0
Braces := []
Program =
(
-,+[ Read first character and start outer character reading loop
-[ Skip forward if character is 0
>>++++[>++++++++<-] Set up divisor (32) for division loop
#!/usr/bin/env python3
import hashlib
import html
import json
import re
import socketserver
import sys
import threading
import time
#! /usr/bin/env python3
import socket
import threading
import tkinter as tk
import re
import sys
import time
from datetime import datetime
@G33kDude
G33kDude / vm.py
Last active April 15, 2018 22:30
import os
import struct
import sys
INTRANGE = 2 ** 15
REGCOUNT = 8
class Arch:
def __init__(self):
self.registers = [0] * REGCOUNT
#NoEnv
SetBatchLines, -1
Input := Clipboard
Input := StrSplit(Input, "`n", "`r")
Size := StrSplit(Input.Remove(1), " ")
Scale := 5
Gui, +hWndhWnd
#Persistent
Small := 32
Medium := 48
Large := 96
IconSize := Small
hDesktop := GetDesktop()
HalfW := A_ScreenWidth/2