Skip to content

Instantly share code, notes, and snippets.

@DickyT
DickyT / Default.json
Created January 23, 2022 02:36
iTerm2 config
{
"Ansi 6 Color" : {
"Red Component" : 0.44862163066864014,
"Color Space" : "sRGB",
"Blue Component" : 0.77801251411437988,
"Alpha Component" : 1,
"Green Component" : 0.83343273401260376
},
"Tags" : [
@DickyT
DickyT / install.sh
Last active January 25, 2022 05:45
new Mac setup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install --cask google-chrome keka iterm2 visual-studio-code spotify charles iina teamviewer
brew install python3 wget nodejs yarn httpie mediainfo ffmpeg openssl
wget https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Operator%20Mono%20Dark.itermcolors -O /tmp/OperatorMonoDark.itermcolors
/Applications/iTerm.app/Contents/MacOS/iTerm2 /tmp/OperatorMonoDark.itermcolors
RUNZSH=no sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
sed -i '' 's/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"gallois\"/g' ~/.zshrc
document.querySelector('input[type=text]').onkeyup = function (e) {
if (/[a-zA-Z]/.test(e.key) && Math.floor(Math.random() * 11) > 7) {
e.target.value += e.target.value.charAt(e.target.value.length - 1);
}
}
00:000 00:000 AAPL: #[EB|LOG:INIT] 2020-12-26T00:28:16
00:104 00:104 AAPL: #[EB|VERSION] <"bootbase.efi 495.60.1~4 (Official), built 2020-11-23T06:28:08-0800">
00:212 00:108 AAPL: #[EB|BUILD] <"BUILD-INFO[304]:{"DisplayName":"bootbase.efi","DisplayVersion":"495.60.1~4","RecordUuid":"02584802-F48C-4E06-A7EE-8B40DB1D21EF","BuildTime":"2020-11-23T06:28:08-0800","ProjectName":"efiboot","ProductName":"bootbase.efi","SourceVersion":"495.60.1","BuildVersion":"4","BuildConfiguration":"Release","BuildType":"Official"}">
00:326 00:114 AAPL: #[EB|CFG:DEV] r2 0x0 0x0
00:433 00:106 AAPL: #[EB|H:IS] 0
00:539 00:106 AAPL: #[EB|WL:MODE] 0
00:646 00:106 AAPL: #[EB|CFG:ARG] boot-save-log 0x0000000000000002 (0x0000000000000002 < 0xFFFFFFFFFFFFFFFF) default
00:751 00:105 AAPL: #[EB|CFG:ARG] wake-save-log 0x0000000000000002 (0x0000000000000002 < 0x0000000000000002) default
00:868 00:116 AAPL: #[EB|CFG:ARG] console 0x0000000000000001 (0x0000000000000001 < 0x0000000000000001) default
00:973 00:105 AAPL: #[EB|CFG:ARG] serial
@DickyT
DickyT / key.key
Created April 22, 2020 03:55
key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCcRxB01dPtHJScoW0RGY+gvR3EL8zLBUf9dIgSt38qyoD9M1sSU3LWRxwf58/+tzKtCNxxvOA1+NczERJVti0GlJsarESAVExAqzWkUxxifKvyfMkjuyuHlsmuV0AfdxhqoeBSr7On7G9NnHYaL760fdQbBjBiew0A5ppZqjpBuQwOkpNlAooHtMVcuEU25QxSHSoUcBA1bY9LTs2gWHjj7/f6kF78+SzYZcqGbQmf1M1bd+6QHYFca7tXwi/acY1V1eYWBnPno3uOqeSMPVbYYNh7pkXrt98u9NwQmygl4NZU0uZSauB1LfMczlaDmBII1VDV9/zaHRIxbzWuchpgekoUqXYsMnXdPiogKni/e3lumVqbTPCuJpqXrfKRkdtPLGLUSn1Zd8wxpJQ74IQSA/n+S9RqfmHDjDUCjlpuEv9SbjXTa2WWSkFpRvjsJQ1T18Azgj44ZZR6dwsnFP4AnjJi3FUuXCGwjdTLhGlKcceq3hujy01wP4pgpSTuF1nca6Uom72L1vgg0TsriIdjrB6WUpN6aZChHIOpjOz0viyCuZbwQn9jrySO+8eIHYOZsEkMbLl0wcB0qXxt+1GnS4AJ100KNBZzkp1hR1bVVVgNjW9FSgMNejtwQEigb+w1C4zEJXSXLzi6bg3gQ5BQ/v2koJ3auEI60Hc5Hvsb5Q== a@aa.com
@DickyT
DickyT / add.js
Last active April 11, 2020 22:20
auto_add.bestbuy.js
function tryToAdd(sku) {
const audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3');
const intId = setInterval(() => {
fetch("https://www.bestbuy.com/cart/api/v1/addToCart", {
"credentials": "include",
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0",
"Accept": "application/json",
"Accept-Language": "en-US,en;q=0.5",
"Content-Type": "application/json; charset=UTF-8"
@DickyT
DickyT / test.m
Created January 11, 2020 09:27
Send touch events to WKWebKit from other UIView
NSValue *value = [webView valueForKey:@"_contentView"];
WKContentView *content = [value nonretainedObjectValue];
UIWebTouchEventsGestureRecognizer *gesture = [[UIWebTouchEventsGestureRecognizer alloc] initWithTarget:content action:@selector(_webTouchEventsRecognized:) touchDelegate:content];
[gesture setDelegate:content];
[forwardView addGestureRecognizer:gesture];
@DickyT
DickyT / hook.js
Last active December 20, 2019 06:39
Use NSNotificationName for addObserverForName in frida
const nCenter = ObjC.classes.NSNotificationCenter.defaultCenter();
const addEventListener = nCenter['- addObserverForName:object:queue:usingBlock:'];
const onConnect = new ObjC.Block({
retType: 'void',
argTypes: ['object'],
implementation: function () {
console.log('OK');
},
});
@DickyT
DickyT / icloud.js
Created December 6, 2019 12:30
Trigger Find My iPhone Alarm with Puppeteer
const puppeteer = require('puppeteer');
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const playSoundOnDevice = async (username, password, deviceName) => {
const browser = await puppeteer.launch({
args: [
'--disable-features=site-per-process',
@DickyT
DickyT / README.md
Last active September 21, 2019 08:33
Windows Admin Center for Domain Controller Machines

As you guys know, Windows Admin Center does not allow to be installed on a domain controller Windows Server machine, this is stupid.

I modified the original msi packages, so they can be installed on Domain Controll machines.

Note:

  1. They can ONLY be install on a Domain Control Server, please refer to official msi bundle if you are using other version of Windows Server.

  2. I would suggest you NOT enable auto update with this modified version of WAC