Skip to content

Instantly share code, notes, and snippets.

View naoyeye's full-sized avatar
🦾

J.Y Han naoyeye

🦾
View GitHub Profile
@naoyeye
naoyeye / JSONView-dark-theme.css
Created February 27, 2019 03:51
chrome JSONView dark-theme
body {
white-space: pre;
font-family: "Source Code Pro", consolas;
color: white;
background: #2d3845;
font-size: 13px;
}
.property {
color: orange;
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,
@naoyeye
naoyeye / h5XiamiAutoRedirect.user.js
Last active October 31, 2018 06:27
虾米的mac 客户端,歌曲页面复制链接分享时,拿到的是h5页面的链接,h5页面没有针对 pc做适配,这个脚本可以在打开虾米歌曲h5页面时,自动跳转到正常的虾米歌曲 pc 端页面。
// ==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=*
// =====html
<input type="number" name="price" />
<button class="btn buy">做多</button>
<button class="btn sell">做空</button>
// =====js
const accounts = [
{
'name': 'account-1',
#!/usr/bin/python
arr = []
def save(filename, contents):
fh = open(filename, 'w')
fh.write(contents)
fh.close()
def readTxt():
@naoyeye
naoyeye / get_douban_album_pic.py
Last active January 3, 2018 07:20 — forked from wenLiangcan/get_douban_album_pic.py
下载豆瓣相册图片
#!/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:
@naoyeye
naoyeye / JSONView Dark Theme.css
Last active November 22, 2017 06:07 — forked from timnew/JSONView Dark Theme.css
This is a dark theme for JSONView chrome extension
body {
white-space: pre;
font-family: "Source Code Pro", consolas;
color: white;
background: #2d3845;
font-size: 13px;
}
.property {
color: orange;
@naoyeye
naoyeye / shanbay.js
Created June 16, 2017 05:33
扇贝中搜索特定的某个同桌申请者
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) {
@naoyeye
naoyeye / break-word.css
Last active May 10, 2019 08:22 — forked from liveme/break-word.css
连续字符换行/不换行
/*强制不换行*/
div {
white-space: nowrap;
word-wrap: normal;
}
/*自动换行*/
div {
/* 清除内外边距 */
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; }