Skip to content

Instantly share code, notes, and snippets.

@mlzboy
mlzboy / qiniu_sslcert.py
Created January 18, 2023 13:33 — forked from lewangdev/qiniu_sslcert.py
qiniu_sslcert
#!/usr/bin/env python
## Dependencies:
#
# pip install qiniu
#
## Tips for Deploy certs to Qiniu:
#
# export DOMAIN=lewangdev.com
# export QINIU_DOMAIN=images.${DOMAIN},staticfiles.${DOMAIN}
@mlzboy
mlzboy / manifest.json
Created March 29, 2020 14:54 — forked from IzumiSy/manifest.json
Chrome.storage.sync example
{
"name": "SyncExtension",
"version": "0.1",
"manifest_version": 2,
"description": "Storage Sync Extension",
"permissions": [ "storage" ],
"browser_action": {
@mlzboy
mlzboy / Selenium.Python.InjectJS.py
Created September 16, 2018 20:14 — forked from anhldbk/Selenium.Python.InjectJS.py
Inject jQuery into Selenium Driver
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.facebook.com/')
with open('jquery-1.9.1.min.js', 'r') as jquery_js:
jquery = jquery_js.read() #read the jquery from a file
driver.execute_script(jquery) #active the jquery lib
driver.execute_script("$('#email').text('anhld')")
@mlzboy
mlzboy / graphviz.html
Created August 10, 2018 07:23 — forked from afomi/graphviz.html
Graphviz Example
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"browser" ->
"http_request" ->
"server" ->
"routes" ->
"controller" ->
"model" -> "controller"
"controller" -> "response"
"response" -> "view" -> "html"
@mlzboy
mlzboy / config.json
Created April 30, 2018 01:06 — forked from wd/config.json
基于 3.8.6 以上 ss 版本的方案
{
"log": {
"loglevel": "none"
},
"inbound": {
"port": 23456,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
/* Red button theme for JQuery Mobile
* - Use data-theme="r" for red versions of the default JQuery Mobile Buttons.
******************************************************************************************/
.ui-btn-up-r {
border: 1px solid #721414;
background: #AB2525;
font-weight: bold;
color: #fff;
text-shadow: 0 -1px 1px #000;
@mlzboy
mlzboy / gist:656656
Created October 31, 2010 14:33 — forked from fredwu/gist:580095
source 'http://rubygems.org'
# --------------------
# Rails
# --------------------
gem 'rake'
gem 'arel', :git => 'git://github.com/rails/arel.git'#, :branch => '1-0-stable'
# gem 'rails', '~> 3.0.0'
gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-0-stable'
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
/* Ejs parser for Nodejs
*
* Copyright (c) 2009, Howard Rauscher
* Licensed under the MIT License
*/
// PUBLIC METHODS
function parse(input) {
var output = [];
var innerOutput = [];
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#