Skip to content

Instantly share code, notes, and snippets.


我愿人长久 ihewro

View GitHub Profile
jat001 /
Created Feb 20, 2020
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
import requests
import simplejson as json
opensvn /
Last active Sep 2, 2017
If a file in local git repository has no write permission, nutstore will stuck in analyzing that file. This script add write permission to the files modified in a day, so nutstore can upload those files.
#!/usr/bin/env bash
today=`date +%Y-%m-%d`
check_modify_time() {
modify_date=`stat $file | grep -i Modify | awk -F. '{print $1}' | awk '{print $2}'`
if [ ${today} = ${modify_date} ]; then
return 0
phrozenra / login-navigator.js
Created Feb 17, 2017
react-navigation: full screen background with transparent status bar and nav bar
View login-navigator.js
import React from 'react'
import { StackNavigator } from 'react-navigation'
import { Image, StatusBar, Platform } from 'react-native'
import SignInScreen from './signin'
import LoginScreen from './login'
import RegisterScreen from './register'
import ForgotPasswordScreen from './forgot-password'
import Styles from '../../styles/login'
MrTrustor /
Last active Sep 17, 2021
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or
southill / imgLoadBeforeOnload.js
Created Oct 25, 2013
View imgLoadBeforeOnload.js
// 更新:
// 05.27: 1、保证回调执行顺序:error > ready > load;2、回调函数this指向img本身
// 04-02: 1、增加图片完全加载后的回调 2、提高性能
* 图片头数据加载就绪事件 - 更快获取图片尺寸
* @version 2011.05.27
* @author TangBin
* @see
* @param {String} 图片路径