Skip to content

Instantly share code, notes, and snippets.

View luodaoyi's full-sized avatar
🏠
Working from home

luodaoyi luodaoyi

🏠
Working from home
  • Dalian Company
  • Marceleneport ,Idaho ,Fiji
View GitHub Profile
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/polipo_1.1.1-8_amd64.deb
sudo dpkg -i polipo_1.1.1-8_amd64.deb
@luodaoyi
luodaoyi / OpenGLHook.cpp
Created March 27, 2019 17:22
openGL Hook
```c
namespace OpenGLMemory
{
template<typename T>
T Read(DWORD address)
{
return *((T*)address);
}
template<typename T>
void Write(DWORD address, T value)
@luodaoyi
luodaoyi / hook.cpp
Created March 27, 2019 17:21
LoadLibrary Hook
MinHook addr:
https://github.com/TsudaKageyu/minhook
```c
#include "MinHook.h"
typedef HMODULE (WINAPI *TYPE_LoadLibraryA)(LPCSTR);
TYPE_LoadLibraryA g_loadLibraryA_original = NULL;
HMODULE WINAPI LoadLibraryA_replacement(_In_ LPCTSTR lpFileName)
@luodaoyi
luodaoyi / README.md A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@luodaoyi
luodaoyi / setup-dhcpv6.sh
Created September 12, 2018 09:17
online.net server setup ipv6 shell
```shell
#!/bin/bash
DUID=$1
skill -9 dibbler-client
dpkg -P dibbler-client
rm -rvf /etc/dibbler /var/log/dibbler /var/lib/dibbler
apt-get install -y wide-dhcpv6-client vim-common
@luodaoyi
luodaoyi / backup-db.sh
Created August 23, 2018 05:08 — forked from roylez/backup-db.sh
dokku postgres backupscript
#! /bin/bash
#
# to restore:
# gunzip XXX.db.gz
# dokku postgres:import <dbname> < XXX.db
# directory to save backups in, must be rwx by postgres user
BASE_DIR="/var/backups/postgres"
YMD=$(date "+%Y-%m-%d")
DIR="$BASE_DIR"
# Update & Upgrade the System
sudo apt-get update
sudo apt-get upgrade
# Install dependencies there might be more based on your system
# However below instructions are for the fresh Ubuntu install/server
# Please carefully watch the logs because if something could not be install
# You have to make sure it is installed properly by trying the command or that particular
# dependency again
![](https://ws2.sinaimg.cn/large/006tKfTcly1fk6wgjthrej31kw0t3wo4.jpg)
```
Dictionary<string, object> temp = new Dictionary<string, object>();
temp.Add("Name", "金朝钱");
temp["Age"] = 31;
temp["Birthday"] = DateTime.Now;
dynamic obj = new System.Dynamic.ExpandoObject();
foreach (KeyValuePair<string, object> item in temp)
{