Skip to content

Instantly share code, notes, and snippets.

View mc256's full-sized avatar
🤗
follow the rabbit

Jun Lin (Michael) Chen mc256

🤗
follow the rabbit
View GitHub Profile
@mc256
mc256 / launch.json
Created July 3, 2023 21:49
VSCode configuration for Starlight
{
"version": "0.2.0",
"configurations": [
{
"name": "Starlight Proxy",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "cmd/starlight-proxy/main.go",
},
@mc256
mc256 / install.sh
Last active January 9, 2021 18:03
Install node 14 LTS on RaspberryPi
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt-get install -y nodejs
node --version
npm install -g yarn
@mc256
mc256 / r18.js
Last active December 30, 2019 23:54
download wnacg
fast_img_host =''
imglist.forEach(element=>{
console.log('wget -O ' + element['caption'].replace(']','').replace('[','') + '.jpg https://' + element['url'] )
})
@mc256
mc256 / torch_example.swift
Created December 6, 2019 16:21
torch_example.swift
private lazy var module: TorchModule = {
if let filePath = Bundle.main.path(forResource: "model", ofType: "pt"),
let module = TorchModule(fileAtPath: filePath) {
return module
} else {
fatalError("Can't find the model file!")
}
}()
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC4LoQTSfdrv/FvkALotxsrcxgzc0rzoM4JIzSQPiMnggVuA7uXjSUwMz11pEAntGSrsUe/pwkkGzlHyQyROn7tCURIx4SOtFVnf1HcpHFNxjEbcycLXMWCucMdZRqZyNU2EfdUiacuENh3wrALmmb8hHRB/kRfa8rdm09M7uuDJK3NA9eL+3nbxPwZpE1kKdchmVGYnfrLplJJUEbuHblH2qXlhLTV2UsF2lVHxwG/Y/rzDW9FCMB6Wcpuc3DPva5ZDZxaeYI/qFNSvMn8DPrPC3iFVZQLNeDKFakSqPfJMQP+5JvvWwbRFumVcsfz2XfqGGh5H6lLB82qQYG+duzLrbI4zFU6OZLcUetPkpMYjOYFVCTC56GDvUbIHzqgy81mB3XIZS6hcA+iEQgc5Lg0qoO5KlfdvVRrpiNahg9wfq9a+c3OH1nrvHdKa0p/cI/XAKSHSj1NPeBOnZNnJ8dNuP6N3Ygenft9lcLlXYKYonpPk8KLh13UgZWiLr7GT3DzG5OJXpk6KfBd7iAtfGiEndPkdcN4kx5LFLs+pBRgOkq38PoylivJQ5xD9vtUILu8JbAqgzR2y638iHBduSOIN60ACl4o4837fhCPbfG3qMFsiV0eUZK/8fICmM7hnLnEVvTzWOH68dZkfX6eVvTauFwvNyKP92PPAsEEDAH9Mw== jlchen@warren
@mc256
mc256 / gist:6669face01165a88634609f3e43121de
Created December 20, 2018 19:39
How to open jupyter notebook
sudo -u nginx /var/lib/nginx/.local/bin/jupyter notebook
@mc256
mc256 / xxx.cpp
Created November 9, 2018 03:17
Forward file to input stream
std::ifstream in("ABSOLUTE_PATH_TO_YOUR_FILE");
std::cin.rdbuf(in.rdbuf());

EECS1022 Lab1 Hints

Please be proud of what you wrote. Keep your code formatted.

HTML5

<!DOCTYPE html>
<html>
package test;
import java.sql.*;
public class TestMysql {
public static void main(String[] args) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection cnt = DriverManager.getConnection("jdbc:mysql://localhost/app_server", "app_server", "WVezBsbqNPCSMMyN");
gcc -pipe -std=c++11 -lstdc++ -pthread -lev -lcrypto ./*.hpp ./*.cpp \
./connection/*.hpp ./connection/*.cpp \
./interface/*.hpp ./interface/*.cpp \
./program/*.hpp ./program/*.cpp \
./socks5/*.hpp ./socks5/*.cpp \
./utility/*.hpp ./utility/*.cpp