Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
万物皆可.git

我愿人长久 ihewro

:octocat:
万物皆可.git
View GitHub Profile
@jat001
jat001 / namebase.py
Created Feb 20, 2020
Sell HNS automatically
View namebase.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
@opensvn
opensvn / nutstore_git.sh
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.
View nutstore_git.sh
#!/usr/bin/env bash
today=`date +%Y-%m-%d`
check_modify_time() {
file=$1
modify_date=`stat $file | grep -i Modify | awk -F. '{print $1}' | awk '{print $2}'`
if [ ${today} = ${modify_date} ]; then
return 0
fi
@phrozenra
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
MrTrustor / clean-docker-for-mac.sh
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.
View clean-docker-for-mac.sh
#!/bin/bash
# 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
southill / imgLoadBeforeOnload.js
Created Oct 25, 2013
在图片onload之前获取图片的头部数据中的宽高
View imgLoadBeforeOnload.js
// 更新:
// 05.27: 1、保证回调执行顺序:error > ready > load;2、回调函数this指向img本身
// 04-02: 1、增加图片完全加载后的回调 2、提高性能
/**
* 图片头数据加载就绪事件 - 更快获取图片尺寸
* @version 2011.05.27
* @author TangBin
* @see http://www.planeart.cn/?p=1121
* @param {String} 图片路径