Skip to content

Instantly share code, notes, and snippets.

@Shu-Ji
Shu-Ji / README.md
Created July 2, 2018 09:17 — forked from mottosso/README.md
QML Reloading in PyQt5

Usage

git clone https://gist.github.com/fa01c80080363df3433d.git qmlreload
cd qmlreload
python main.py

Edit either SceneGraphEditor.qml or Viewport.qml and then hover it and hit F5 to reload.

@Shu-Ji
Shu-Ji / client.py
Created April 15, 2016 06:59 — forked from ajdavis/client.py
大数据下载tornado - Big download demo with Tornado 3.0.1 and pycurl.
from tornado.httpclient import HTTPRequest, AsyncHTTPClient
import tornado.ioloop
import tornado.web
from tornado import gen
GB = 1024 * 1024 * 1024
total_downloaded = 0
def streaming_callback(chunk):
@Shu-Ji
Shu-Ji / gist:aa723f0e1bd69897b8ae
Created November 6, 2015 08:01 — forked from simonw/gist:92481
Compile nginx standalone without root access
# Compile nginx standalone without root access
mkdir ~/installed
mkdir ~/installed/nginx
mkdir ~/src
cd ~/src
# PCRE dependency - we'll compile against this statically
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-7.8.tar.gz
tar -xzvf pcre-7.8.tar.gz
TodoListCtrl = ['$scope', '$localStorage', '$http', 'DTOptionsBuilder',
($scope, $ls, $http, DTOptionsBuilder) ->
$scope.dt_options = DTOptionsBuilder
.newOptions()
.withPaginationType('full_numbers')
.withDisplayLength(8)
]
window
Run = ['$rootScope', '$localStorage', ($rootScope, $ls) ->
$rootScope.$ls = $ls
]
window.bootstrap_angular = ->
default_dependencies = ['ngStorage']
app_dependencies = default_dependencies
for dependency in arguments
app_dependencies.push dependency
extends base
append scripts
script(src="jquery/datatables/js/jquery.dataTables.min.js")
script(src="angular/datatables/angular-datatables.min.js")
script(src="todo.js")
doctype html
html(lang="en" ng-app="app")
head
meta(charset="utf-8")
meta(name="viewport" content="width=device-width initial-scale=1.0")
meta(name="renderer" content="webkit")
body
block scripts
script(src="jquery/jquery-2.1.4.min.js")
script(src="angular/angular.min.js")
{
"main": "__init__.html",
"name": "pabomail",
"description": "Another email desktop client for linux. Written by @shu3ji, sanhaolu.com",
"version": "0.1.0",
"keywords": ["email", "client", "node-webkit", "python"],
"node-remote": "<local>",
"window": {
"show": false,
"title": "nwdemo",
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8">
</head>
<body>
@Shu-Ji
Shu-Ji / nw-demo-app.py
Created February 26, 2015 06:37
nw-demo-app.py
# coding: u8
import os.path as osp
import sys
root = osp.dirname(osp.abspath(__file__))
libs = osp.join(root, 'libs')
sys.path.insert(0, libs)