Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / 0_writing.md
Created June 3, 2016 06:38

심심풀이로 하는 역난독화

최근에 한 불법 만화 번역 업로드 사이트가 요상한 스크립트를 써서 이미지 핫링킹을 방지하고 있는 것을 발견했다. 이미지를 조각으로 나눈 뒤 클라이언트 단에서 다시 조합하는 방식이었다.

이게 그 스크립트이다. URL의 쿼리에서 볼 수 있듯이 이 글을 쓰고 있는 때의 버전은 0.1a5. 처음 이 스크립트를 발견했을 때의 버전은 0.1a3이었는데 계속해서 수정되고 있는 것 같다. 1_original.js 파일로 업로드해두었다.

대체 어떻게 돌아가는 거야 이거? Google Chrome에 내장된 beautifier를 이용해 코드를 보기 좋게 만들었다. 2_beautified.js로 업로드해두었다.

음, 복잡하다.

Problems & Solutions for Interaction Between C and Go

At Vimeo, on the transcoding team, we work a lot with Go, and a lot with C, for various tasks such as media ingest. This means we use CGO quite extensively, and consequently, have run into bits that are perhaps not very well documented, if at all. Below is my effort to document some of the problems we've run into, and how we fixed or worked around them.

Many of these are obviously wrong in retrospect, but hindsight is 20/20, and these problems do exist in many codebases currently.

Some are definitely ugly, and I much welcome better solutions! Tweet me at @daemon404 if you have any, or have your own CGO story/tips, please! I'd love to learn of them.

Table of Contents

var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@paulsmith
paulsmith / echo.go
Created January 12, 2011 06:09
A simple echo server testing a few interesting Go language features, goroutines and channels.
// $ 6g echo.go && 6l -o echo echo.6
// $ ./echo
//
// ~ in another terminal ~
//
// $ nc localhost 3540
package main
import (