Skip to content

Instantly share code, notes, and snippets.

View weirongxu's full-sized avatar
🎯
Focusing

Raidou weirongxu

🎯
Focusing
View GitHub Profile
@weirongxu
weirongxu / cloudSettings
Last active July 3, 2021 02:26
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-03T02:26:55.928Z","extensionVersion":"v3.4.3"}
@weirongxu
weirongxu / gitstars.json
Created February 6, 2018 07:19
github stars manager for production
{"tags":[],"lastModified":1517901577516}
geek
@weirongxu
weirongxu / nginx.conf
Last active May 17, 2024 15:50
nginx image filter
server {
# Internal image resizing server.
server_name localhost;
listen 8888;
location /resize {
alias /var/www/app/current/public/imgs;
image_filter resize $arg_width $arg_height;
image_filter_jpeg_quality 75;
allow 127.0.0.0/8;
data:text/html;charset=UTF-8,
<html>
<head>
<title>editor</title>
<style>
body {
display: flex;
margin: 0;
}
#viewer,
;(function($) {
$.fn.extend({
ajaxForm: function(){
var action = this.attr('action');
var method = this.attr('method');
var d = $.Deferred();
this.on('submit', function(){
fetch(action, {
method: method,
credentials: 'same-origin',
@weirongxu
weirongxu / ng-http-agent.coffee
Last active August 29, 2015 14:14
ng-http-agent
require 'app'
.factory 'http', [
'$http'
'$q'
'$location'
(
$http
$q
$location
)->
@weirongxu
weirongxu / Promise.coffee
Last active August 29, 2015 14:07
angular $q queue
require 'app'
.factory 'Promise', [
'$q'
(
$q
)->
# $q 和 Promise 都兼容的方法
# @example 1)
# new Promise (resolve, reject, notify)->
# if flag
<?xml version="1.0" encoding="utf-8"?>
<select>
<option value='110000'>
北京市
</option>
<option value='110100'>
北京市北京市市辖区
</option>
<option value='110101'>
北京市北京市东城区
#!/usr/bin/env bash
i=0
while [[ $i -lt 10000 ]] ; do
curl -s "http://dmxz.zerodm.net/e/public/ViewClick/?classid=2&id=9003&addclick=1" > /dev/null
((i++))
done
0