Skip to content

Instantly share code, notes, and snippets.

View codeskyblue's full-sized avatar

codeskyblue codeskyblue

View GitHub Profile
@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
#!/usr/bin/python
# -*- coding: utf-8 -*-
# utf-8 中文编码
import glob
import os,sys
import json
reload(sys)
sys.setdefaultencoding('utf-8')
import time, sys,iptc # iptc 包通过 sudo pip install python-iptables 安装
from datetime import datetime
@sukima
sukima / delay.js
Last active May 20, 2019 09:14
Simple jQuery $.delay promise snippit
jQuery.delay = function(ms, value) {
var defer = new jQuery.Deferred();
setTimeout(function() { defer.resolve(value); }, ms || 0);
return defer.promise();
};
var Term;
(function() {
'use strict';
var socket = io.connect();
window.addEventListener('load', function() {
var element = document.getElementById('js-terminal'),
cell = createCell(element),
@border
border / dev.sh
Last active January 18, 2018 03:39
- 贵厂的 ssh 自动登录脚本 dev.sh - smb auto mount scipt for mac: mount.sh
#!/usr/bin/expect
#
# Auto Login script Relay And Dev Server For XXX
#
set tokenprepass "Token PIN"
set relayhost "OOXX@xxx.com"
set server "OOXX@SERVER_HOST"
set password "HOST_PASSWD"
@diffused
diffused / gist:5517341
Created May 4, 2013 12:24
Python peewee orm. How to do a "where in (1,2,3)" style query. It was kind of tricky to find the syntax in the docs/google
products = Product.select().where(
Product.id << [161,162,163,164,165]).where(
~(Product.brand_name >> None)
)
@ninehills
ninehills / SimpleHTTPServerWithUpload.py
Created December 12, 2012 04:19
Simple HTTP Server With Upload.
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
Usage: python -m SimpleHTTPServerWithUpload 8888
"""
@leemars
leemars / sync.sh
Created July 5, 2012 02:50
Git -> SVN sync script
#!/bin/bash
if [[ $# != 1 && $# != 2 ]]
then
echo "$0 <path to git repository> [tree-ish]"
exit 1
fi
msg() {
echo -e -n "\e[32;1m==>\e[0m "