Skip to content

Instantly share code, notes, and snippets.

@devnoname120
devnoname120 / Cygwin Mirror Tester.au3
Created April 6, 2014 18:44
Cygwin Mirror Tester
;#NoTrayIcon
#include <WinHttp.au3>
#include <String.au3>
#include <array.au3>
$mirrorsUrl = "http://cygwin.com/mirrors.lst"
$aMirrorsUrl = StringSplit($mirrorsUrl, "/", 2)
$mirrorsHost = $aMirrorsUrl[2]
$mirrorsFile = $aMirrorsUrl[3]
@devnoname120
devnoname120 / removeLastLines.py
Last active August 29, 2015 14:02
NoPicAds: remove new line character from files
# NoPicAds: remove new line character from files
# https://github.com/legnaleurc/nopicads/
import glob
for fileName in glob.glob("src/sites/*/*.js"):
with open(fileName, "r", encoding='utf-8') as file:
lines = file.readlines()
# If last line is empty
@devnoname120
devnoname120 / henkakuwikianalyze.py
Created November 9, 2016 04:33
Script that helped in changing the wiki.henkaku.xyz between Library and Module
#! /usr/bin/env python3
import requests
import re
from bs4 import BeautifulSoup
def dicadd(dic, dic_add):
@devnoname120
devnoname120 / gist:5ca52e6a8f0ce6b3a192f54704747a00
Created November 29, 2016 13:37
Terminal one liner for renaming .c to .cpp
for f in $(find . -name "*.c"); do mv -- "$f" "${f%.c}.cpp"; done
@devnoname120
devnoname120 / gist:a1f1f68f3c55e5ea13cf102c1d81d021
Created December 31, 2016 18:01
Yifanlu's explanations on why CMake is better than a simple Makefile
<yifanlu[m]> okay I'll engage in this one last time
<yifanlu[m]> evolution of build systems (for C)
<yifanlu[m]> shell scripts => makefiles => automake => autoconf/cmake
<yifanlu[m]> saying makefiles are better is like saying the model t is better because it gets you from point a to point b with no issues
<yifanlu[m]> while missing all the advances people made for a couple of decades
<yifanlu[m]> "but my ford fiesta is so complicated. I don't understand how it works!"
<yifanlu[m]> I agree autoconf/cmake are not perfect systems. and they are more painful to write/maintain.
<yifanlu[m]> but the idea is at some point you will run into a wall
<yifanlu[m]> "oh shit how do I do this"
<yifanlu[m]> and you have to hack together a solution
@devnoname120
devnoname120 / gist:a565bea1b7f38393f220ec34f82ed6ba
Last active October 13, 2023 14:07
Extra PS Vita error codes
0x80010016 = subdirectory limit reached
0x80101104 = trying to install a VPK that has a corrupted entry in the vita db (edit ur0:/shell/db/app.db to get rid of it (you can use https://anthe.studio/bubblestudio/), and delete the ux0:/app/thebrokenapp folder)
0x8010111C = head.bin missing from package being promoted
0x8010113D = trying to install a package that has livearea images that were not run through pngquant
C0-11278-9 = cannot delete bubble (why?)
C1-6775-5 = launching unsigned app from official firmware
C2-12828-1 = Uncaught exception (abort() called). Happens in normal use when the memory card has corrupted sectors.
@devnoname120
devnoname120 / aREADME.md
Last active October 13, 2023 14:06
All vita 3.60 NIDs of User and Kernel exports

DB Lookup

Overview

This file is a reference database of every exported functions on a PS Vita running firmware retail 3.60.

Why?

This is helpful to create db.yml tools. For example, I can make sure that every NID of the vitasdk actually exists. I can also use this to find the library and module corresponding to functions in a NID list.

@devnoname120
devnoname120 / aReadme.md
Last active November 7, 2019 08:03
010 Hex Editor Template for .psv

.psv Structure viewer

This little specification allows to view the structure of .psv files in 010 Editor.

screenshot

This allows you to get a quick overview of the keys, the signature, and the sha256 hash.

In order to use this specification you need to:

@devnoname120
devnoname120 / tiling_window_managers.md
Last active January 8, 2021 12:51
The quest for a decent tiling window manager on Windows and Mac OS

Windows:

  • workspacer: Fast (C#) and close to i3, but really clunky.
  • dwm win: Pretty decent! Feels snappy but top bar is lagging for some reason ¯\_(ツ)_/¯
  • HashTWM: ?

(considered but bad)

  • MaxTo: Rigid manually-defined layouts, bad shortcuts.
  • AquaSnap: No virtual workspaces, bad shortcuts.
  • FancyZones: Only mouse, rigid, no virtual workspaces.