Skip to content

Instantly share code, notes, and snippets.

@cdtinney
cdtinney / WSJ_Unlock_Bookmarklet.js
Created March 10, 2018 20:48
WSJ Unlock Bookmarklet
javascript:window.location.href='https://m.facebook.com/l.php?u='+encodeURIComponent(window.location.href);
@zvving
zvving / CLLocation+Sino.h
Last active January 9, 2019 02:39
火星坐标系转换扩展。Earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
//
// CLLocation+Sino.h
//
// Created by i0xbean@gmail.com on 13-4-26.
// 火星坐标系转换扩展
//
// earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
// 未包含 mars2earth. 需要这个可参考 http://xcodev.com/131.html
#import <CoreLocation/CoreLocation.h>
@phith0n
phith0n / php5.dockerfile
Last active May 19, 2021 12:40
分享自己用的两份Alpine-php-fpm的dockerfile
FROM alpine:3.3
MAINTAINER Didiet Noor <dnoor@kulina.id> (@lynxluna)
# Patch APK Mirror to YKode
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.3/main" > /etc/apk/repositories
ENV TIMEZONE Asia/Shanghai
ENV PHP_MEMORY_LIMIT 512M
ENV MAX_UPLOAD 50M
@astanin
astanin / compare.py
Created October 14, 2010 15:20
Compare two aligned images of the same size
#!/usr/bin/env python
"""Compare two aligned images of the same size.
Usage: python compare.py first-image second-image
"""
import sys
from scipy.misc import imread
from scipy.linalg import norm
@juancarlospaco
juancarlospaco / 10-my-media-automount.rules
Last active October 17, 2022 15:16
UDev rule that auto mounts any hot-plugged device under /media/<label> and works seamlessly with vfat, ntfs, etc USB storages on Arch Linux. Paste this file and reboot:
# /etc/udev/rules.d/10-my-media-automount.rules
# start at sdb to ignore the system hard drive
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
# import some useful filesystem info as variables
IMPORT{program}="/sbin/blkid -o udev -p %N"
@iamralch
iamralch / ssh_client.go
Last active April 16, 2023 03:09
SSH client in GO
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
{
"stats": {},
"api": {
"services": [
"StatsService"
],
"tag": "api"
},
"policy": {
"levels": {
#!/bin/sh
docker run -t -e UID="$(id -u)" -e GID="$(id -g)" -v "$PWD":/w -w /tmp --rm alpine sh -c 'wget "https://github.com/Tomas-M/iotop/archive/master.zip" && unzip master.zip && cd iotop-master && apk add gcc make ncurses-dev linux-headers ncurses-static musl-dev && V=1 LIBS="-no-pie -static -static-libgcc -static-libstdc++" make && strip -s iotop && chown "$UID:$GID" iotop && chmod +x iotop && mv iotop /w/'
@colemickens
colemickens / amiibo-emulation-with-linux-vm.md
Last active March 23, 2024 03:37
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

Some users are discussing this guide in #hacking on the JoyConDroid Discord: https://discord.gg/SQNEx9v.

DO NOT ask for, or share links to, Amiibo bins in the comments! They will be removed. Thank you for understanding.

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter