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 / dcss_namuwiki.js
Last active October 21, 2015 15:44
๋Œ์ฃฝ + ๋‚˜๋ฌด์œ„ํ‚ค = ?
mondic = {
"river rat": [
"๊ฐ•๊ฐ€ ์ฅ ",
"๋…ํŠนํ•œ ์ดˆ๋ก์ƒ‰์„ ์ง€๋‹Œ ์„ค์น˜๋ฅ˜, ์ž์‹ ์˜ ์ˆ˜๋งŽ์€ ๋™๋ฃŒ๋“ค๊ณผ ๋ฌผ๊ฒฐ์น˜๋“ฏ ๋“ฑ์žฅํ•œ๋‹ค.",
"๊ณ ๊ธฐ์— ๋…์ด ์žˆ๋‹ค. ๋ณดํ†ต ์ง์Šน ์†Œ๊ตด์—์„œ ๋ฌด๋”๊ธฐ๋กœ ๋‚˜์˜จ๋‹ค. ํ•˜๋‚˜ ํ•˜๋‚˜๋Š” ๋ณ„๋กœ ์œ„ํ—˜ํ•˜์ง€ ์•Š์ง€๋งŒ ๊ฐœํ™œ์ง€์—์„œ ๋–ผ๊ฑฐ์ง€๋กœ ๋‚˜์˜ค๋Š” ํƒ“์— ์ดˆ๋ฐ˜์ด๋ผ ์ŠคํŽ™์ด ๋”ธ๋ฆฌ๊ฑฐ๋‚˜ ๊ด‘์—ญ๊ธฐ๊ฐ€ ์—†์„ ๊ฒฝ์šฐ ์œ„ํ—˜ํ•  ์ˆ˜๋„ ์žˆ๋‹ค. 0.16 ์ดํ›„ ์ดˆ๋ก์ƒ‰ ์ฅ(Green Rat)์—์„œ ์ด๋ฆ„์ด ๋ฐ”๋€Œ์—‡๋‹ค"
],
"deep elf master archer": [
"๋”ฅ ์—˜ํ”„ ๋งˆ์Šคํ„ฐ ์•„์ฒ˜ ",
"๋งˆ์Šคํ„ฐ ์•„์ฒ˜๋“ค์€ ๊ทธ๋“ค์˜ ์ธ์ƒ ๋Œ€๋ถ€๋ถ„์„ ๊ถ์ˆ ์— ์Ÿ์•„๋ถ€์€ ์ž๋“ค์ด๋‹ค. ๋‹ค๋ฅธ ๋”ฅ์—˜ํ”„๋“ค์—๊ฒŒ ์žˆ์–ด ๋งˆ๋ฒ•์€ ๋ฐ€์ ‘ํ•˜์ง€๋งŒ, ์ด๋“ค์—๊ฒŒ๋Š” ๊ทธ์ € ํ•˜์ฐฎ์€ ๋ˆˆ์†์ž„์— ์ง€๋‚˜์ง€ ์•Š๋‹ค.",
"๋ฉ€๋ฆฌ์„œ ์ด๋˜๋Š” ํ™”์‚ด๋“ค์—๊ฒŒ ์“ฐ๋Ÿฌ์ง„ ์œ ์ €๋“ค์˜ ๋น„๋ช…์†Œ๋ฆฌ๊ฐ€ ๋“ค๋ฆฌ๋Š”๋“ฏ ํ•˜๋‹ค. Repel Missiles/Deflect Missiles์˜ ๋งˆ๋ฒ•์ด ์ ˆ์‹คํ•˜๊ฒŒ ํ•„์š”ํ•  ํƒ€์ด๋ฐ์ด ๋ฐ”๋กœ ์ดํƒ€์ด๋ฐ์ด ์•„๋‹๊นŒ ์‹ถ์„ ์ •๋„๋กœ ๋ฐ๋ฏธ์ง€๊ฐ€ ์ƒ๋‹นํ•œ ํ™”์‚ด๋“ค์„ ์‘์‘ ๋ฐœ์‚ฌํ•ด๋Œ€๋Š”๋ฐ ์ด๊ฒŒ ์—ฌ๊ฐ„ ๋ฒ„ํ‹ธ๋งŒํ•œ๊ฒŒ ์•„๋‹ˆ๋‹ค. ๋งˆ๋ฒ•์‚ฌ๋“ค์€ ์ผ๋‹จ ๋ฐฉ์–ด๋ ฅ์ด ์•ฝํ•˜๊ธฐ์— ๊ฑฐ์˜ ๋ฐ๋ฏธ์ง€๋ฅผ ๋ฌธ์ž ๊ทธ๋Œ€๋กœ ๋ฐ›๊ธฐ ๋•Œ๋ฌธ์— ์ฃผ์˜ํ•˜์ž. ๋ธ”๋ ˆ์ด๋“œ ๋งˆ์Šคํ„ฐ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํˆฌ๋ช… ๊ฐ์ง€์™€ ๋…์ €ํ•ญ์ด ์—†๋Š”๊ฒƒ์ด ๊ฐ€์žฅ ํฐ ์•ฝ์ . ํˆฌ๋ช… ๊ฐ์ง€ or ๋… ์ €ํ•ญ ์•„์ดํ…œ์„ ์ฃผ์–ด์„œ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๊ฒŒ ์•„๋‹ˆ๋ผ๋ฉด ํˆฌ๋ช…ํ™”, ๋งตํ‹ฑ, ์ฟ ๋ผ๋ ˆ ๋“ฑ์œผ๋กœ ์ƒ๋Œ€ ํ•˜์ž. ๊ณตํฌ์˜ ์Šคํฌ๋กค์ด ๋จนํžˆ๊ธฐ๋Š” ํ•˜๋Š”๋ฐ ๋„ˆ๋ฌด ์ด๊ฒƒ๋งŒ ๋ฏฟ๊ณ  ๋‹ค๋‹ˆ์ง„ ๋ง์ž. ๋” ์•ˆ์ „ํ•œ ์ˆ˜๋‹จ์„ ํ•˜๋‚˜๋” ์ค€๋น„ํ•˜๊ณ  ์‹œ์ž‘ํ•˜์ž."
@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()