Skip to content

Instantly share code, notes, and snippets.

View empjustine's full-sized avatar

大関 金城 秀喜 カシオ empjustine

View GitHub Profile
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 August 4, 2024 20:55
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__/
@empjustine
empjustine / get_gists.py
Created May 15, 2020 20:02 — forked from leoloobeek/get_gists.py
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
#!/bin/bash
# https://www.jetbrains.com/help/idea/working-with-projects.html#invalidate-cache
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
# https://www.jetbrains.com/help/idea/2019.3/tuning-the-ide.html#default-dirs
# https://www.jetbrains.com/help/idea/2020.1/tuning-the-ide.html#default-dirs
# .IntelliJIdea20???? (IntelliJ IDEA Ultimate Edition)
# .IdeaIC20???? (IntelliJ IDEA Community Edition)
# .PyCharmCE20????