Skip to content

Instantly share code, notes, and snippets.

View anch0vy's full-sized avatar
๐Ÿ˜ธ
Working from home

anch0vy anch0vy

๐Ÿ˜ธ
Working from home
View GitHub Profile
@anch0vy
anch0vy / filter.txt
Last active December 1, 2021 08:03
personal filter
! 2021-11-28 https://www.google.com
! block
! google.com##[href*="template"]:upward(4)
google.com##[href*="codegrepper.com"]:upward(4)
google.com##[href*="githubmemory.com"]:upward(4)
google.com##[href*="codestudyblog.com"]:upward(4)
google.com##[href*="pythonq.com"]:upward(4)
google.com##[href*="stackovergo.com"]:upward(4)
google.com##[href*="pythonrepo.com"]:upward(4)
@anch0vy
anch0vy / script.py
Created July 25, 2018 00:58
dingjmax
import gdb
gdb.execute('file ./dingjmax')
class MyBreakpoint(gdb.Breakpoint):
first = True
def stop (self):
if self.first:
gdb.execute('set *(unsigned char*)0x401b90 = 0')
gdb.execute('set *(unsigned char*)0x401b91 = 0')
self.first = False
@anch0vy
anch0vy / test.py
Last active August 12, 2016 04:23
test.py
import itertools
loopCallCouter = 0
def loop(min_, max_, n, sum):
global loopCallCouter
loopCallCouter += 1
if max_ * n < sum:
yield ()
@anch0vy
anch0vy / README.md
Created April 21, 2016 21:43
๋ฐœ๋กœ์ง ์ฝ”๋“œ

๋ฐœ๋กœ์ง ์ฝ”๋“œ tw.py ์‹คํ–‰ํ›„ ๋ธŒ๋ผ์šฐ์ ธ์—์„œ ํ—ˆ๋ฝํ•˜๊ณ  ํ•€์ฝ”๋“œ๋œจ๋ฉด ์ž…๋ ฅ ๊ธฐ๋‹ค๋ฆฌ๋‹ค๋ณด๋ฉด info.json ์ƒ์„ฑํ•จ pic ์ด๋ž‘ vid ํด๋”๋ฅผ ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด๋†”์•ผํ•จ ๊ทธ๋‹ค์Œ parser.py ์‹คํ–‰ํ•˜๋ฉด ์ €์žฅํ•ด์คŒ

1ํšŒ์šฉ์ฝ”๋“œ๋ผ PEP8๋„ ์ฒดํฌ์•ˆํ•˜๊ณ  ์˜ˆ์™ธ์ฒ˜๋ฆฌ๋„ ์•”๊ฒƒ๋„์•ˆํ•จ...

์ €์žฅํ˜•์‹: ํŠธ์œ—์•„์ด๋””_์‚ฌ์ง„์ˆœ์„œ.ํ™•์žฅ์ž

@anch0vy
anch0vy / keybase.md
Created February 25, 2016 13:01
keybase.md

Keybase proof

I hereby claim:

  • I am anch0vy on github.
  • I am anch0vy (https://keybase.io/anch0vy) on keybase.
  • I have a public key whose fingerprint is F132 2233 FCCE 6DCA E1BF 1477 00A0 2624 C24D E60A

To claim this, I am signing this object:

@anch0vy
anch0vy / safecalc.py
Last active February 14, 2016 13:36
safecalc
def safe_calc(chat):
import ast
try:
tree = ast.parse(chat)
except SyntaxError:
return None
for node in ast.walk(tree):
for instance in [ast.Call,ast.Exec,ast.Import,ast.ImportFrom,ast.FunctionDef,ast.Lambda,ast.ClassDef]:
if isinstance(node,instance):
return None
@anch0vy
anch0vy / asdf.js
Created February 3, 2016 23:31
no facebook
// ==UserScript==
// @name facebook
// @namespace http://www.facebook.com/
// @description no facebook
// @domain www.facebook.com
// @include http://www.facebook.com/*
// @include https://www.facebook.com/*
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
@anch0vy
anch0vy / debug.py
Created September 22, 2015 19:59
python debug code
def debug():
import inspect,code
frame = inspect.stack()[1][0]
code.interact(local=frame.f_locals)
@anch0vy
anch0vy / ssh_test.py
Last active September 8, 2015 11:35
ssh test
import paramiko
import code
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('localhost', username='root', password='password', port = 22)
stdin, stdout, stderr = ssh.exec_command('ls -al')
print 'ls -al test 1'
print stdout.read()
ch = ssh.invoke_shell()
@anch0vy
anch0vy / ch0vycoin.py
Created August 5, 2015 08:08
ch0vycoin
# -*- coding: utf-8 -*-
import time
import pickle
import struct
from math import log,e
from hashlib import md5
startBlock = 'cat'
def mine(block,diff):