Skip to content

Instantly share code, notes, and snippets.

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

silver lee agfe2silver

🏠
Working from home
View GitHub Profile
# A simple CMake script for building the application.
cmake_minimum_required(VERSION 2.8)
project(create-x509)
# Our only dependency is OpenSSL
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable(create-x509 create-x509.cpp)
@agfe2silver
agfe2silver / dewarp.py
Last active April 8, 2018 02:43 — forked from kscottz/dewarp.py
from SimpleCV import Camera, VideoStream, Color, Display, Image, VirtualCamera
import cv2
import numpy as np
import time
# build the mapping
def buildMap(Ws,Hs,Wd,Hd,R1,R2,Cx,Cy):
map_x = np.zeros((Hd,Wd),np.float32)
map_y = np.zeros((Hd,Wd),np.float32)
for y in range(0,int(Hd-1)):
@agfe2silver
agfe2silver / password.txt
Created July 11, 2017 01:29 — forked from gabonator/password.txt
HiSilicon IP camera root passwords
Login Password
root xmhdipc
root klv123
root xc3511
root 123456
root jvbzd
default OxhlwSG8
defaul tlJwpbo6
defaul S2fGqNFs
root hi3518
@agfe2silver
agfe2silver / cheat_sheet.txt
Created December 18, 2017 02:00
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
@agfe2silver
agfe2silver / mac-database.txt
Created March 27, 2018 00:39 — forked from mnewt/mac-database.txt
mac address lookup script
# $Id$ generated with make-mac-prefixes.pl
# Original data comes from http://standards.ieee.org/regauth/oui/oui.txt
# These values are known as Organizationally Unique Identifiers (OUIs)
# See http://standards.ieee.org/faqs/OUI.html
# We have added a few unregistered OUIs at the end.
000000 Xerox
000001 Xerox
000002 Xerox
000003 Xerox
000004 Xerox
@agfe2silver
agfe2silver / ssl_test2.c
Created May 14, 2018 08:48 — forked from roxlu/ssl_test2.c
Compact example of how to use openSSL with self signed (no password) keys/certificates, DTLS and memory BIOs
/*
Create server/client self-signed certificate/key (self signed, DONT ADD PASSWORD)
openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -keyout client-key.pem -out client-cert.pem
openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -keyout server-key.pem -out server-cert.pem
*/
#include <stdio.h>
@agfe2silver
agfe2silver / appsScript_ListFilesFolders_ver.2.js
Last active June 8, 2018 03:40 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@agfe2silver
agfe2silver / etc-hosts-on-win.md
Created October 30, 2018 01:53 — forked from zenorocha/etc-hosts-on-win.md
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

@agfe2silver
agfe2silver / Ubuntu-Chinese-Font.md
Last active May 31, 2019 07:20 — forked from erain/Ubuntu-Chinese-Font.md
Font configuration editing has fixed.

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。