Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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.
@devnoname120
devnoname120 / Accord du participe passé d'un verbe pronominal.md
Last active March 9, 2022 16:29
French grammar — Accord du participe passé d'un verbe pronominal

ACCORD :

  1. Avec le COD placé avant le verbe : verbes pronominaux réfléchis / réciproques + « s'arroger ».
  • « Ma mère s'est blessée en coupant le pain. » (Ma mère a blessé qui ? Ma mère.)
  • « Ma sœur s'est donné la peine d'aider ces enfants. » (Ma sœur a donné quoi ? La peine (COD placé après le verbe).)
  • « Les fiancés se sont écrit pendant de longs mois » (Ils se sont écrit quoi ? Une lettre (à priori).)

👌  Ici on voit que le sujet a souvent valeur de COD (mais pas toujours sinon ça serait trop facile).

Pour info, les verbes suivants ont jamais de COD (mais ça sert à rien de retenir) : se plaire, se complaire, se déplaire, se rire, se sourire, se succéder, se ressembler, se parler, se nuire, se survivre, se suffire, se convenir.

@devnoname120
devnoname120 / powerpoint-force-reapply-note-master.vba
Created January 15, 2023 14:40
PowerPoint — Force to reapply the master note to all the slides
Sub RestoreNotesPages()
Dim oSld As Slide
Dim oShp As Shape
Dim lIdx As Long
On Error Resume Next
With ActivePresentation
For Each oSld In .Slides
With oSld.NotesPage.Shapes
@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.