Skip to content

Instantly share code, notes, and snippets.

View shangjiyu's full-sized avatar

shangjiyu shangjiyu

  • AAA
  • Hangzhou|Jiaxing China
View GitHub Profile
@extremecoders-re
extremecoders-re / openwrt-qemu.md
Last active March 22, 2024 13:20
Running OpenWRT ARM under QEMU

Environment

The steps shown below are done on a Ubuntu VM using Qemu 3.0

$ qemu-system-arm -version
QEMU emulator version 3.0.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

To quit Qemu at any time press Ctrl+a x, i.e. Ctrl+a and then x

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@shangjiyu
shangjiyu / VesBuildingOnWindows
Last active January 4, 2016 21:39
VES ANDROID BUILDING FOR WINDOWS
##Installing the Windows development environment
============================================================================================
#Download and install the Android SDK from here: http://developer.android.com/sdk/index.html
You should download and install the ADT Bundle for Windows(of course you can DIY). This will give you a .zip file. There is no executable installer.  
You will just have to unzip this into a directory.  For this example I unziped this file into D:\Android-sdk.
#Then the NDK http://developer.android.com/tools/sdk/ndk/index.html
#Need to get Java JDK as well
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@stevenhaddox
stevenhaddox / server_certificates_to_pem.md
Last active May 8, 2024 07:13
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample