Skip to content

Instantly share code, notes, and snippets.

View gaocegege's full-sized avatar
🐮
Programming

Ce Gao gaocegege

🐮
Programming
View GitHub Profile
@johan
johan / octocat.svg
Created June 4, 2011 11:16
Github octocat avatar, SVG format
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package main
import (
"fmt"
"time"
)
func main() {
t, err := time.Parse(time.RFC3339Nano, "2013-06-05T14:10:43.678Z")
if err != nil {
@mjkallen
mjkallen / Sketch1.java
Last active May 23, 2017 15:05
A basic Processing sketch -using the grafica plotting library- in Java with R integration using Renjin. This sketch calls R's runif() command to generate 100 random numbers, multiplies these by 10 and creates a line plot of the result.
import javax.script.*;
/* The Processing.core.PApplet jar is included in the Processing.org download.
* Search Google for "Processing Eclipse" to find instructions on how to get this
* dependency available in Eclipse.
*/
import processing.core.PApplet;
/* 'grafica' is a third-party library for Processing.org, see https://github.com/jagracar/grafica.
* The easiest thing to do is to copy the Java src/grafica directrory into your own project.
@bitristan
bitristan / server.js
Last active January 31, 2018 23:50
open wechat verify with node js
var url = require('url'),
crypto = require('crypto'),
querystring = require('querystring'),
http = require('http'),
port = 18080;
var token = '***your token';
http.createServer(function(req, res) {
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@timotgl
timotgl / uninstall-razer-synapse.sh
Last active June 14, 2024 08:59
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@SaulLawliet
SaulLawliet / eleme.py
Last active January 11, 2022 09:22
查询饿了么品牌馆中有哪些是 <真·五折>
# coding: utf-8
import json
import re
import requests
# 替换成你自己的经纬度数据
# 查询方式 打开饿了么官网 -> 开发者模式 -> 输入送餐地址 -> 观察请求 -> 找到经纬度数据
latitude = 31.23978
longitude = 121.49968
@lyastro
lyastro / readme.md
Last active January 7, 2024 15:28
install Tensorflow with GPU support on Centos 7

install Tensorflow with GPU support on Centos 7

system: fully installed Centos 7

  • system update
$ sudo yum -y update
$ sudo yum -y install epel-release
$ sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel
@thockin
thockin / nginx.conf
Last active March 21, 2023 11:00
Idea: nginx vanity domain fronting gcr.io
# This is a GCR vanity domain. It aliases our domain to a specific
# bucket in GCR.
# e.g.`docker pull gcr.example.com/foobar` -> gcr.io/my_bucket/foobar
server {
server_name gcr.example.com;
listen 80;
listen 443 ssl;
location = /v2/ {
# If we redirect this, it can detect as unauthorized, but the token
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);