This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
white-space: pre; | |
font-family: "Source Code Pro", consolas; | |
color: white; | |
background: #2d3845; | |
font-size: 13px; | |
} | |
.property { | |
color: orange; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newVisit = getCookie("dt") ? !1 : !0, | |
userName = getCookie("nm") || !1; | |
setCookie("dt", Math.round((new Date).getTime() / 1E3), 8760); | |
var G = google.maps, | |
map; | |
window.panorama = ""; | |
var svClient = new G.StreetViewService, | |
geocoder = new G.Geocoder, | |
selfLocationRevert = 0, | |
selfLocationRevertThreshold = 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name h5XiamiAutoRedirect | |
// @namespace h5-xiami-auto-redirect | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author naoyeye | |
// @homepage http://han.im | |
// @include https://h.xiami.com/song.html?id=* | |
// @include https://h.xiami.com/collect_detail.html?id=* | |
// @include https://h.xiami.com/artist_detail.html?id=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =====html | |
<input type="number" name="price" /> | |
<button class="btn buy">做多</button> | |
<button class="btn sell">做空</button> | |
// =====js | |
const accounts = [ | |
{ | |
'name': 'account-1', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
arr = [] | |
def save(filename, contents): | |
fh = open(filename, 'w') | |
fh.write(contents) | |
fh.close() | |
def readTxt(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Filename: get_douban_album_pic.py | |
import urllib2, re, os, sys | |
from os.path import basename | |
from urlparse import urlsplit | |
def fetch(url): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
white-space: pre; | |
font-family: "Source Code Pro", consolas; | |
color: white; | |
background: #2d3845; | |
font-size: 13px; | |
} | |
.property { | |
color: orange; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var count = 1 | |
var got = false | |
function searchYou() { | |
$.ajax({ | |
'url': 'https://www.shanbay.com/api/v2/deskmate/userinfos/?page=' + count + '&ipp=10', | |
'success': function(resp) { | |
var list = resp.data.objects | |
if (!list.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*强制不换行*/ | |
div { | |
white-space: nowrap; | |
word-wrap: normal; | |
} | |
/*自动换行*/ | |
div { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 清除内外边距 */ | |
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, fieldset, button, input, textarea, th, td { margin: 0; padding: 0;} | |
body, button, input, select, textarea { font: 12px/1 Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif;} | |
h1 { font-size: 18px;} | |
h2 { font-size: 16px;} | |
h3 { font-size: 14px;} | |
h4, h5, h6 { font-size: 100%;} | |
address, cite, dfn, em, var { font-style: normal; } | |
code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } |