Skip to content

Instantly share code, notes, and snippets.

View wedojava's full-sized avatar
🎯
Focusing

回风 wedojava

🎯
Focusing
View GitHub Profile
@cmod
cmod / hugofastsearch.md
Last active April 17, 2025 23:32 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator
@haozibi
haozibi / golang-function-anonymous.go
Last active June 3, 2020 11:17
range 与 闭包的使用,Go词法作用域陷阱,捕获迭代变量 -- gopl 5.6.1
package main
import (
"fmt"
"sync"
)
var list = [...]int{1, 2, 3, 4, 5}
func main() {
@mohnish
mohnish / Mintty.md
Last active February 23, 2024 17:03 — forked from appikonda/Mintty.md
Mintty Themes for Windows

Create .mintty folder with subfolder themes in c:\Users\< >

 Example:
 C:\Users\sandeep\.mintty\themes

Download '.minttyrc' files from https://github.com/iamthad/base16-mintty and add them to themes folder.

@mgeeky
mgeeky / python_memory_dump.py
Created June 27, 2017 22:18
Example of dumping memory from within Python's code, using `ctypes.c_byte.from_address`
#!/usr/bin/python
def hex_dump_memory(ptr, num):
import ctypes
s = ''
n = 0
lines = []
data = list((num * ctypes.c_byte).from_address(ptr))
@ebraminio
ebraminio / upload.go
Last active March 22, 2023 06:01
golang upload client and server
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename' http://127.0.0.1:5050/upload
package main
import (
"fmt"
"io"
"net/http"
"os"
"time"
@conoro
conoro / hexo2hugo.sh
Created July 10, 2016 09:55
Hexo to Hugo converter
# code is from http://helw.net/2015/07/19/migrating-to-hugo-from-hexo/
# Ran fine on Windows 10 with MSysGit installed
# cd to directory with all the md files from Hexo
# bash hexo2hugo.sh
---
# ensure dates don't start with single quotes
for file in *; do awk '{
if ($1 == "date:") {
gsub("\047", "", $0); print;
} else {
@HarmJ0y
HarmJ0y / keepass2john.py
Created June 30, 2016 06:02
Python port of John the Ripper's keepass2john - extracts a HashCat/john crackable hash from KeePass 1.x/2.X databases
#!/usr/bin/python
# Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/)
# ./keepass2john.c was written by Dhiru Kholia <dhiru.kholia at gmail.com> in March of 2012
# ./keepass2john.c was released under the GNU General Public License
# source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c
#
# Python port by @harmj0y, GNU General Public License
#
@yannispanousis
yannispanousis / README.md
Last active October 14, 2019 19:30
L2TP Client Setup (Ubuntu 15.10)

L2TP Client Setup for Ubuntu

You'll need:

  • VPN server IP
  • VPN pre-shared key
  • VPN username
  • VPN password

The following instructions are mostly derived from the corresponding ones for ArchLinux in this wiki.

@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@michaellihs
michaellihs / twisted.md
Last active August 27, 2024 17:07
Write your own ssh Server with the Python Twisted library

SSH Server with the Python Twisted Library

Installing the library

Assuming you have Python installed on your system:

pip install twisted
pip install pyOpenSSL
pip install service_identity