Skip to content

Instantly share code, notes, and snippets.

@kaseiwang
kaseiwang / gist:4c7bc52b8d313e1a94f4
Last active September 13, 2015 06:38 — forked from pandada8/gist:6200455
A Dnspod DDNS Update shell, Python Version
import requests
import socket
import time
socket.setdefaulttimeout(10)
TIMEOUT=60
params = {
"login_email"="[email protected]",
"login_password"="yourpassword",
"format"="json",
@kaseiwang
kaseiwang / PKGBUILD
Last active March 13, 2016 15:08
lib32-virtualgl
# Maintainer: Sven-Hendrik Haase <[email protected]>
# Contributor: FigoDaPaura <ffigoDaPaura>
pkgname=lib32-virtualgl
pkgver=2.5
pkgrel=1
pkgdesc="32-bit serverside components for 64-bit VirtualGL servers"
arch=('x86_64')
url="http://virtualgl.org"
license=('LGPL')
class Solution {
public:
int maximalSquare(vector<vector<char>>& matrix) {
int m=matrix.size(), n=0, size=0;
if(m)
n=matrix[0].size();
else
return 0;
for(int i=0; i<m-size; i++){
for(int j=0; j<n-size; j++){
@kaseiwang
kaseiwang / PKGBUILD
Created February 3, 2017 05:52
rslsync/btsync 2.4.4 PKGBUILD
# Contributor: Dalton Miller
# Contributor: Kilian Lackhove [email protected]
# Contributor: Justin Patera [email protected]
# Maintainer: ava1ar <mail(at)ava1ar(dot)me>
pkgname=btsync
pkgver=2.4.4
pkgrel=1
pkgdesc="BitTorrent Sync (Resilio) - automatically sync files via secure, distributed technology"
license=("custom:btsync")
@kaseiwang
kaseiwang / keybase.md
Last active April 25, 2021 11:07
keybase.md

Keybase proof

I hereby claim:

  • I am kaseiwang on github.
  • I am kaseiwang (https://keybase.io/kaseiwang) on keybase.
  • I have a public key whose fingerprint is 7028 E1F3 20C4 5EE9 8473 B1C3 5F1B C1A1 BF2B 11D0

To claim this, I am signing this object:

@kaseiwang
kaseiwang / gist:07fa0e135845b713d59b9ee93b7e059e
Created February 26, 2018 02:51
delete --with-openssl from opts (line #31)
# Maintainer: hdhoang <[email protected]>
pkgname=nginx-mainline-mod-fancyindex
pkgver=0.4.2
pkgrel=3
_modname="${pkgname#nginx-mainline-mod-}"
_nginxver="$(/bin/nginx -v 2>&1 | grep -Eo '([[:digit:]]|\.)+')"
pkgdesc='Fancy indexes module for the Nginx web server'
@kaseiwang
kaseiwang / boost-1.68.patch
Created September 25, 2018 05:57
PCL boost-1.68 patch
diff --git a/visualization/src/pcl_visualizer.cpp b/visualization/src/pcl_visualizer.cpp
index 5b12331..7104802 100644
--- a/visualization/src/pcl_visualizer.cpp
+++ b/visualization/src/pcl_visualizer.cpp
@@ -100,7 +100,7 @@
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/common/common.h>
#include <pcl/common/time.h>
-#include <boost/uuid/sha1.hpp>
+#include <boost/uuid//detail/sha1.hpp>
package main
import (
"fmt"
"log"
"net"
)
const host string = "0.0.0.0"
const port int = 12345
@kaseiwang
kaseiwang / usage.sh
Last active November 28, 2023 08:52
write and clear cloudflare's clientid in wireguard
# listening port and client_id is hardcoded in wgcf_bpf_helper.c
# compile
clang -O2 -target bpf -c wgcf_bpf_helper.c -o wgcf_bpf
# attach ingress
ip link set dev eth0 xdpdrv obj wgcf_bpf sec wg-cf-xdp-ingress
# remove ingress
ip link set dev eth0 xdpdrv off
# enable tc