Skip to content

Instantly share code, notes, and snippets.

View nonkr's full-sized avatar
🎯
Focusing

Nonkr nonkr

🎯
Focusing
  • Hangzhou, China
View GitHub Profile
@nonkr
nonkr / mysql2sqlite.sh
Last active December 30, 2015 06:49 — forked from esperlu/mysql2sqlite.sh
从mysql导出数据到sqlite 使用方法:./mysql2sqlite.sh -h host -u Username -pPasswd dbname | sqlite3 sqlite.db
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
<key>GDI Commands</key>
<dict>
<key>GDI Duplicate Selected Line</key>
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string>
<key>GDI Delete Selected Line</key>
<string>moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToEndOfLine:</string>
<key>GDI Move Selected Line Up</key>
<string>selectLine:, cut:, moveUp:, moveToBeginningOfLine:, insertNewLine:, paste:, moveBackward:</string>
<key>GDI Move Selected Line Down</key>
<string>selectLine:, cut:, moveDown:, moveToBeginningOfLine:, insertNewLine:, paste:, moveBackward:</string>
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@nonkr
nonkr / hshy_checkin.py
Created April 13, 2018 17:35 — forked from ficapy/hshy_checkin.py
练手python脚本,登陆Discuz论坛打卡签到
# -*- coding: utf-8 -*-
import requests
import hashlib
import re
username = '' ###账号###
password = ''###密码###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
Chrome/27.0.1453.116 Safari/537.36"
headers = {