Skip to content

Instantly share code, notes, and snippets.

@tangrs
tangrs / bin2elf.sh
Last active January 14, 2025 20:03
Convert a memory dump/raw binary image into an ELF file
#!/bin/sh
# Convert a raw binary image into an ELF file suitable for loading into a disassembler
cat > raw$$.ld <<EOF
SECTIONS
{
EOF
echo " . = $3;" >> raw$$.ld
@kylemcdonald
kylemcdonald / build-caffe.md
Last active March 26, 2024 05:52
How to build Caffe for OS X.

Theory of Building Caffe on OS X

Introduction

Our goal is to run python -c "import caffe" without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to explain why each step happens.

This page has OS X specific install instructions.

I assume:

@zml2008
zml2008 / VkComputeSample.c
Created May 30, 2016 06:10 — forked from sheredom/VkComputeSample
A simple Vulkan compute sample
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
@doctorpangloss
doctorpangloss / install_caffe.sh
Last active October 16, 2024 14:28
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
#!/bin/sh
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Apple hides old versions of stuff at https://developer.apple.com/download/more/
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download
@jinyu121
jinyu121 / NetAuth.py
Last active January 18, 2025 12:14
复旦大学网络自动认证脚本
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import requests
import logging
import socket
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active April 16, 2025 07:20
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@hzshang
hzshang / socks5pipe.go
Created April 25, 2023 05:33
A socks5 wrapper without authentication
package main
import (
"log"
"os"
"context"
"github.com/things-go/go-socks5"
"golang.org/x/net/proxy"
"flag"
"net"
@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active April 18, 2025 14:37
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue/Angular) apps