Skip to content

Instantly share code, notes, and snippets.

@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active July 12, 2024 15:04
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

@debsahu
debsahu / deck_lights.yaml
Created November 30, 2020 06:58
ESPHome settings for ESP32 that controls Deck LEDs
esphome:
name: deck_lights
platform: ESP32
board: lolin32
wifi:
networks:
- ssid: !secret esphome_wifi_ssid1
password: !secret esphome_wifi_pass1
- ssid: !secret esphome_wifi_ssid2
@heywoodlh
heywoodlh / reset-terminal-services.ps1
Created September 1, 2017 14:49
Script for renewing RDP License
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days.
## Developed by Prakash Kumar (prakash82x@gmail.com) May 28th 2016
## www.adminthing.blogspot.com
## Disclaimer: Please test this script in your test environment before executing on any production server.
## Author will not be responsible for any misuse/damage caused by using it.
Clear-Host
$ErrorActionPreference = "SilentlyContinue"
## Display current Status of remaining days from Grace period.
@stuartlangridge
stuartlangridge / TypeFileOut.py
Created January 9, 2014 16:11
Sublime Text 2 Python plugin to "type" the file that's currently being edited, character by character, for screencasts.
import sublime, sublime_plugin
BLOCKLEN = 4
class TypeFileOutCommand(sublime_plugin.TextCommand):
def nextchar(self):
if self.body:
totype = []
while 1:
try:
@whs
whs / sudoku.py
Created July 29, 2013 01:36
sudoku solver
sudoku = [
[None, None, 1, 7, None, None, None, 9, 5],
[None, None, 7, None, 8, 9, 2, None, 3],
[None, None, None, 6, None, None, 7, 4, None],
[2, None, None, None, None, None, None, None, None],
[None, None, 4, 9, None, 1, 6, None, None],
[None, None, None, None, None, None, None, None, 8],
[None, 3, 5, None, None, 4, None, None, None],
[6, None, 8, 3, 1, None, 9, None, None],
[1, 7, None, None, None, 6, 5, None, None],
@hackingbutlegal
hackingbutlegal / gist:4760227
Created February 12, 2013 04:22
Windows: Get some information
import win32net
#print users
users = win32net.NetUserEnum('localhost', 0)
print "USERS"
print "=========="
for user in users[0]:
print user['name']
print ""
@hackingbutlegal
hackingbutlegal / gist:4760041
Created February 12, 2013 03:33
Windows: Remotely unlock RDP.
strComputer = InputBox ("Enter Machine Name")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colTSSettings = objWMIService.InstancesOf("Win32_TerminalServiceSetting")
For Each colTS in colTSSettings
colTS.SetAllowTSConnections(1)
Wscript.Echo UCase(strComputer) & "Remote Desktop Is Now Enabled"
Next
@wilxim
wilxim / sublimeGit.txt
Created February 12, 2013 03:00
sublime+git
<!doctype html>