Skip to content

Instantly share code, notes, and snippets.

View cute-angelia's full-sized avatar
🎯
最近在开发游戏服务端,网络基础框架还是比一般的服务复杂

Angelia cute-angelia

🎯
最近在开发游戏服务端,网络基础框架还是比一般的服务复杂
View GitHub Profile
@cute-angelia
cute-angelia / get_gv_loop.sh
Created April 1, 2017 09:54 — forked from Jiezhi/get_gv_loop.sh
replace your curl
for (( i=1; i>0; i++ ))
do
curl 'https://www.google.com/voice/b/0/service/post' -H 'origin: https://www.google.com' -H 'dnt: 1' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: zh-CN,zh;q=0.8,en;q=0.6' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded;charset=UTF-8' -H 'accept: */*' -H 'referer: https://www.google.com/voice/b/0' -H 'authority: www.google.com' -H 'cookie: gv=.........; GV_NR=1;-eVupmL6qR...........ncdG7vO' --data 'sid=...' --compressed
sleep 3s
done
@cute-angelia
cute-angelia / hosts
Last active July 29, 2018 08:27 — forked from alswl/hosts
hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 adv.sec.miui.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
@cute-angelia
cute-angelia / ExportCsv.php
Created October 20, 2017 05:57 — forked from HugoWen/ExportCsv.php
php export csv file
function exportCSV($filename, $data)
{
header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header("Content-Disposition:attachment;filename=".$filename);
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
echo "\xEF\xBB\xBF"; // UTF-8 BOM
echo $data;
@cute-angelia
cute-angelia / toCsv.php
Created October 20, 2017 06:06 — forked from ring0li/toCsv.php
csv
/**
* Export an array as downladable Excel CSV
* http://stackoverflow.com/questions/155097/microsoft-excel-mangles-diacritics-in-csv-files
* @param array $header
* @param array $data
* @param string $filename
*/
function toCSV($header, $data, $filename) {
$sep = "\t";
$eol = "\n";
@cute-angelia
cute-angelia / mac-display-patch-edid
Created October 24, 2017 06:20
mac 外接显示器设置脚本
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
#
# Update 2013-06-24: added -w0 option to prevent truncated lines
require 'base64'
data=`ioreg -l -w0 -d0 -r -c AppleDisplay`
@cute-angelia
cute-angelia / php排序
Created October 27, 2017 03:38
PHP 对二维数组指定key排序
1、利用php array_multisort函数
// 参数:$arr 二维数组 ,$key 需要排序的列 $type 排序类型 $short 排序方式
```
function multi_array_sort($arr,$key,$type=SORT_REGULAR,$short=SORT_DESC){
foreach ($arr as $k => $v){
$name[$k] = $v[$key];
}
array_multisort($name,$type,$short,$arr);
@cute-angelia
cute-angelia / mm.go
Created October 31, 2017 01:31 — forked from lerry/mm.go
package main
import (
"io"
"os"
"fmt"
"sync"
"strconv"
"strings"
@cute-angelia
cute-angelia / hugo-theme-learn-edit-noneed-title.html
Created November 2, 2017 11:31
hugo-theme-learn-edit-noneed-title
<nav id="sidebar" class="{{if $.Site.Params.showVisitedLinks }}showVisitedLinks{{end}}">
{{ $currentNode := . }}
{{ $showvisitedlinks := .Site.Params.showVisitedLinks }}
<div id="header-wrapper">
<div id="header">
{{ partial "logo.html" . }}
</div>
{{if not .Site.Params.disableSearch}}
{{ partial "search.html" . }}
@cute-angelia
cute-angelia / nginx
Last active December 25, 2017 02:12 — forked from pzorn/nginx
php-fpm and nginx init.d script
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: NGINX is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx

在手机上打开safari,地址栏输入其中一个地址:

地址一

地址二

然后回车

按照要求安装此provision文件即可,然后重启。