Skip to content

Instantly share code, notes, and snippets.

@ixs
ixs / ssltest.py
Last active February 28, 2020 21:41
Heartbleed test with data dump functionality.
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
#
# Modified slightly by Andreas Thienemann <athienemann@schubergphilis.com> for clearer exploit code
# and 64k reads
#
# This version of the exploit does write received data to a file called "dump" in the local directory
# for analysis.
@deton
deton / tsf-vim-vac2012.markdown
Last active April 20, 2024 03:40
Vi風操作をWindows用IMEとして実装
@kakakikikeke
kakakikikeke / send-http-request.el
Last active December 15, 2015 12:39
emacsでHTTP Requestを送信、取得するためのelispです。デフォルトemacsに入っている url パッケージを使っています。
(require 'url)
(defun send-http-request (url)
"Send a simple http request and open a result within an other buffer.."
(let
(
(url-request-method "GET")
(url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))))
(url-retrieve url 'switch-to-buffer-for-responce)))
@sky-y
sky-y / ucs-normalize-NFC-buffer.el
Created August 5, 2012 12:14
Emacs: MacでPDFからコピーすると濁点が分離する問題を直す
;; ucs-normalize-NFC-region で濁点分離を直す
;; M-x ucs-normalize-NFC-buffer または "C-x RET u" で、
;; バッファ全体の濁点分離を直します。
;; 参考:
;; http://d.hatena.ne.jp/nakamura001/20120529/1338305696
;; http://www.sakito.com/2010/05/mac-os-x-normalization.html
(require 'ucs-normalize)
(prefer-coding-system 'utf-8-hfs)
(setq file-name-coding-system 'utf-8-hfs)
@vaiorabbit
vaiorabbit / HoughCircles.py
Created June 19, 2011 15:01
HoughCircles.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# USAGE : $ ./HoughCircles.py Media/foo.jpg
import cv
import sys
if __name__ == "__main__":
image = cv.LoadImage(sys.argv[1], cv.CV_LOAD_IMAGE_GRAYSCALE)
src = cv.LoadImage(sys.argv[1])
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')