Skip to content

Instantly share code, notes, and snippets.

View empjustine's full-sized avatar

カシオ 金城 大関 empjustine

View GitHub Profile
{ "全角": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,-./:;<=>?@[]^_`{|}”’¥~!#$%&()*+,-./:;<=>?@[]^_`{|}”’¥~アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポヴァィゥェォッャュョヮヰヱ・ー、。・「」 "
, "半角": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,-./:;<=>?@[]^_`{|}\"'\\~!#$%&()*+,-./:;<=>?@[]^_`{|}\"'\\~アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポヴァィゥェォッャュョ・ー、。・「」 "
}
@empjustine
empjustine / index.js
Created November 5, 2023 22:00
recast sort imports
import fs from 'node:fs';
import recast from 'recast';
const { namedTypes: n, builders: b } = recast.types.builders;
const code = fs.readFileSync(process.stdin.fd, 'utf-8');
const ast = recast.parse(code);
const imports = ast.program.body.filter(node => n.ImportDeclaration.check(node));
Rename files
```sh
printf "@ %s\n@=%s\n" "original-name.txt" "new-name.txt" | zipnote -w redbean-2.0.16.com
```
Change comment on file files
```sh
printf "@ %s\n%s\n@ (comment above this line)" "help.txt" "example comment..." | zipnote -w redbean-2.0.16.com
path = require 'path'
local function get_asset_comment(zip_path)
comment = GetAssetComment(zip_path)
if comment then
return comment
end
return ''
end

reset-documents.ps1

Repair damaged Documents and Desktop folder locations.

Run this as your normal user, in Windows PowerShell

@empjustine
empjustine / UDPDuplicator.py
Created August 10, 2021 02:38 — forked from anri-c/UDPDuplicator.py
Duplicate UDP Packets
# -*- coding: utf-8 -*-
import SocketServer as Ss
import socket
import threading
TARGETS = {'target_host1', 'target_host2'}
PORT = 8989
class DuplicateUDP(Ss.BaseRequestHandler):
@empjustine
empjustine / GamingServices.md
Last active January 2, 2024 21:01
GamingServices not working? Let's try to fix this:

Minimum requirements:

Make sure you meet all minimum requirements: https://ngs.pso2.com/support/system

Most important of said system requirements: Windows 10 Version 18362.0 and higher (64-bit)

CPU must support AVX type instructions, meaning:

  • Intel i3/i5/i7 2nd generation or newer CPU
  • AMD, any cpu less that 10 years old.
@empjustine
empjustine / motorola-x4-uninstall.sh
Last active October 31, 2021 20:06
pm-uninstall-facebook.sh
adb shell pm uninstall -k --user 0 com.motorola.brapps
adb shell pm uninstall -k --user 0 com.google.android.youtube
adb shell pm uninstall -k --user 0 com.google.android.talk # Hangouts
adb shell pm uninstall -k --user 0 com.google.android.apps.tachyon # Duo
adb shell pm uninstall -k --user 0 com.android.chrome
adb shell pm uninstall -k --user 0 com.motorola.ccc.devicemanagement
adb shell pm uninstall -k --user 0 com.motorola.ccc.checkin
adb shell pm uninstall -k --user 0 com.motorola.ccc.mainplm
adb shell pm uninstall -k --user 0 com.motorola.ccc.ota
@empjustine
empjustine / wakelock
Created July 27, 2020 15:32 — forked from tomrenn/wakelock
Python script to wakeup connected Android devices
#!/usr/bin/env python
"""
Simple script that uses ADB to wake and unlock any connected devices
"""
import subprocess
import sys
output = subprocess.check_output(['adb', 'devices'])
output = set(output.split('\n')[1:])
output.remove('')
@empjustine
empjustine / .gitignore
Last active May 16, 2020 08:24 — forked from cnicodeme/pocket.py
Update your reading list by running this local script.
.idea/
venv/
__pycache__/