This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = x | |
email = x | |
[push] | |
default = simple | |
followTags = true | |
[diff] | |
tool = vscode | |
[merge] | |
tool = vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PySide2 import QtCore, QtGui, QtWidgets | |
from PySide2.QtCore import Qt | |
# https://www.pythonguis.com/tutorials/qtableview-modelviews-numpy-pandas/ | |
class TableModel(QtCore.QAbstractTableModel): | |
def __init__(self, data): | |
super(TableModel, self).__init__() | |
self._data = data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# this returns all aimesh routers | |
# nvram get cfg_device_list | |
router="192.168.0.1" | |
user="admin" | |
port=1024 | |
pwd=password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name withDigit | |
// @namespace taobao | |
// @include https://detail.tmall.com/* | |
// @version 0.02 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @grant GM_xmlhttpRequest | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle("table.crap td { padding:0 5px 0 5px; }"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
try: | |
# for python newer than 2.7 | |
from collections import OrderedDict | |
except ImportError: | |
# use backport from pypi | |
from ordereddict import OrderedDict | |
import yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Create widget with available icons from qt and based on freedesktop.org | |
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html | |
""" | |
from PyQt5.QtCore import QSize | |
from PyQt5.QtGui import QIcon | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QGridLayout, QStyle, \ | |
QFormLayout, QLabel, QScrollArea, QLineEdit, QTabWidget | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://stackoverflow.com/questions/12193803/invoke-python-simplehttpserver-from-command-line-with-no-cache-option | |
# without this, it can not run in bg | |
import os | |
import sys | |
sys.stdout = open(os.devnull, 'w') | |
sys.stderr = open(os.devnull, 'w') | |
import http.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: oglops@gmail.com The Tree Widget guy | |
# todo | |
# ctrl+d remove multiple line | |
# double click go to line | |
# ctrl+g go to line | |
# ctrl+r sublime style | |
try: | |
qApp.removeEventFilter(filter) |
NewerOlder