Skip to content

Instantly share code, notes, and snippets.

View changemewtf's full-sized avatar

Max C changemewtf

View GitHub Profile
import requests
# 'Host': 'www.fightcade.com',
# 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0',
# 'Accept': 'application/json, text/plain, */*',
# 'Accept-Language': 'en-US,en;q=0.5',
# 'Accept-Encoding': 'gzip, deflate',
# 'Content-Type': 'application/json;charset=utf-8',
# 'Origin': 'https://www.fightcade.com',
# 'Referer': 'https://www.fightcade.com/id/Tonren',
# 'Cookie': 'cf_clearance=gVpaOGa7hGGeHCt.gu4rjFUtoiFTlXvRpRxflh0O9As-1744823962-1.2.1.1-UCfh1OuYBIyJWVArkIw1Qq5zF3FAp1.tg_9tzdaa0kraKKeqKAVUPbV8VpojnA1hU2B.etJDyziqFrqi24iXl2adgu1yMGUMtuheUICQmeRC8pL5IZE5KFSTIL9FyD93i8klMbFXS31YIHRO6VrhoRzE2XgSKRxP2llTIA9aq.7G3OBQCTjjI8qgFAoU1vGaWsGdPI7pL3UKsQge2PAFgR7PZLIvBHbb0qwFNnBB_0gROXEcBBTsGnlv26OoPPrmydf0Iyka3YcLv7FK9zzgtcQRcGH4DTg8zjhiY_scN3T_EAAOB2irGb1N9DBp6yPjZ04VPqqT9sFfqVi0ks4Xg8p2X0TXP1LWqOtInDEI.YM',
from pywinauto.application import Application
import os
import time, datetime
import threading, subprocess
def find_record_dialog(fcadefbneo_path):
app = Application(backend="win32").connect(path=f"{fcadefbneo_path}\\fcadefbneo.exe")
win = app.top_window()
win.menu_select("Game->RecordAVI")
@changemewtf
changemewtf / GetSynInfo.vim
Last active April 11, 2017 16:52
A utility function for debugging syntax highlight "situations".
" Produces output like:
" vimOption (PreProc fg=225 bg=) < vimSet (fg= bg=) < vimFuncBody (fg= bg=)
nnoremap g<C-h> :echo GetSynInfo()<CR>
function! GetSynInfo()
let stack = synstack(line("."), col("."))
let info = ""
for synid in reverse(stack)
if strlen(info)
@changemewtf
changemewtf / CycleLineNumberDisplay.vim
Last active March 31, 2017 21:17
Twiddle options to make the line number feature more accessible
" Cycle Line Number Display: serialized by Max Cantor
" Twiddle options to make the line number feature more accessible
"
" Notes:
" for a list of useful arguments to :hilight
" :help highlight-args
"
" example highlight customization
" :highlight LineNr cterm=NONE ctermbg=black ctermfg=cyan
1: ~/.vimrc
2: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/syntax.vim
3: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/synload.vim
4: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/syncolor.vim
5: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/filetype.vim
6: ~/.common-public/vim/.vim/colors/hhdgray.vim
7: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/getscriptPlugin.vim
8: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/gzip.vim
9: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/logiPat.vim
10: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/manpager.vim
BASIC_BIND = <<-YAML.strip
First Name: Max
Last Name: Cantor
Display Name: !bind First Name
YAML
RSpec.describe Yuby do
it "performs basic binding" do
hash = Yuby.load BASIC_BIND
expect(hash["Display Name"]).to(
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const LEFT_MOUSE = 0,
DRAG_CLASS = "being-dragged";
function Draggable(el, handle) {
handle.addEventListener("mousedown", event => {
if (event.button != LEFT_MOUSE) { return false; }
event.preventDefault();
new Drag(this, event.clientY);
});
@changemewtf
changemewtf / what_now.md
Last active November 16, 2016 22:52
What now?

What now?

  1. Am I able to focus?
    1. Are there distractions I can get rid of? a. Silence phone a. Close irrelevant browser tabs and windows
    2. In the last 30 minutes, have I... a. Stepped away from the screen
    3. In the last two hours, have I... a. Drank some water
SELECT
state,
COUNT(state)
FROM users
GROUP BY state
-- BONUS 2: Only get states with more than 10 users
HAVING COUNT(state) > 10
-- BONUS 1: Order from lowest to highest user count
ORDER BY COUNT(state)