Skip to content

Instantly share code, notes, and snippets.

View jeasonstudio's full-sized avatar
:octocat:
Focusing

Jeason jeasonstudio

:octocat:
Focusing
View GitHub Profile
@jeasonstudio
jeasonstudio / colorFormat.go
Created February 10, 2017 07:48
ColorFormat RGBA to Hexadecimal
package main
import (
"fmt"
"image"
"image/color"
)
func ColorFormat(color color.Color) string {
thisR, thisG, thisB, _ := color.RGBA()
@jeasonstudio
jeasonstudio / captcha.go
Created February 11, 2017 03:23
Judge USTB Library System Captcha and Print out
package main
import (
"fmt"
"image"
"image/color"
"image/gif"
"image/png"
"math"
"os"
@jeasonstudio
jeasonstudio / iterm2.md
Created February 11, 2017 06:16
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
@jeasonstudio
jeasonstudio / baidu_Chrome.js
Created February 11, 2017 07:10
百度搜索 油猴插件监本
// ==UserScript==
// @name baidu
// @namespace http://jeasonstudio.cn/
// @version 0.1
// @description try to take over the world!
// @author You
// @include http://www.baidu.com/*
// @grant none
// ==/UserScript==
function judgeAdd(idChar) {
@jeasonstudio
jeasonstudio / getPhoneNum.js
Created February 11, 2017 07:12
ocs.kalen.site spyder
var importJs = document.createElement('script') //在页面新建一个script标签
importJs.setAttribute("type", "text/javascript") //给script标签增加type属性
importJs.setAttribute("src", 'http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js') //给script标签增加src属
document.getElementsByTagName("head")[0].appendChild(importJs) //把importJs标签添加在页面
var tagArr = [];
var getCookie = function (id) {
$.ajax({
type: 'POST',
'use strict';
const _JINGDU = 1e-6
function judgeZero(tag) {
return Math.abs(tag) <= _JINGDU
}
// 暴力开平方
function baoliSqrt(num) {
@jeasonstudio
jeasonstudio / ustb_login.sh
Last active May 15, 2019 08:17
校园网登录脚本
#!/bin/bash
# Your StuNo. & Password
username='00000000'
password='00000000'
curl --retry 3 --data "DDDDD=${username}&upass=${password}&0MKKey=123456789" http://202.204.48.66 --silent -o LOGIN_STATUS.out
echo "Login Success!!"
@jeasonstudio
jeasonstudio / spps.v
Created March 12, 2017 13:28
串并转换
module spps (clk, rst_n, en, si, po, flag, load, pi, so, sign );
input clk;
input rst_n;
input en;
input si;
input load;
input flag;
input [7:0] pi;
output reg so;
output reg [7:0] po;
@jeasonstudio
jeasonstudio / spps_t.v
Last active March 13, 2017 08:17
测试激励
`timescale 1ns/1ns
// `include "spps.v"
module spps_tb;
reg clk;
reg rst_n;
reg en;
reg si;
reg load;
@jeasonstudio
jeasonstudio / .zshrc
Created March 14, 2017 01:26
My .zshrc config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
echo ' __ __ __ __ __ '
echo ' / / / /___ / // /____ / /___ ____ _ _____ ____ ____ '
echo ' / /_/ // _ \\ / // // __ \\ __ / // _ \\ / __ `// ___// __ \\ / __ \'
echo ' / __ // __// // // /_/ / / /_/ // __// /_/ /(__ )/ /_/ // / / /'
echo '/_/ /_/ \\___//_//_/ \\____/ \\____/ \\___/ \\__,_//____/ \\____//_/ /_/ '
echo '\n Copyright ©️ 2015-2017 JeasonStudio\n'