THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
using System; | |
using System.IO; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web.Mvc; | |
namespace DemoApp | |
{ | |
public class ExternalJavaScriptFileAttribute : ActionFilterAttribute | |
{ |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import re, sys, os, random, time, json, logging, argparse, requests, urllib | |
from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TPOS,USLT | |
from HTMLParser import HTMLParser | |
parser = HTMLParser() | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template |
jQuery.fn.brightness = function() { | |
var bg_color, rgba, y; | |
bg_color = this.css('background-color'); | |
if ((bg_color != null) && bg_color.length) { | |
rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/); | |
if (rgba != null) { | |
if (rgba[4] === '0') { | |
if (this.parent().length) return this.parent().brightness(); | |
} else { | |
y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3]; |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
/// <summary> | |
/// 一致性 Hash 算法 | |
/// </summary> | |
class ConsistentHashing | |
{ | |
List<KeyValuePair<uint, string>> _serList = new List<KeyValuePair<uint, string>>(); | |
public ConsistentHashing(string[] serList) | |
{ | |
if (serList == null || serList.Length == 0) |
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
UnConfuserEx https://mega.nz/#!U1hxwQKb!7WFBSjrZgg8ieFp15K0RJW8rWuyMHZTO9bpCekhBQfY | |
ConfuserExDupPopPatcher https://mega.nz/#!IkhHzZDS!vPYABdYJtuDIGJBHdKzwIqLajxugJaNlENWr5CWjNlo | |
ConfuserExStringDecryptor https://mega.nz/#!plhxRJyY!Vq9eRS-gixC__q75860gDD8Tcm_ncOfCCCP_HQKguUM | |
ConfuserExCallFixer https://mega.nz/#!0gZFlbwC!KFka_Kxe-GuU-d8COni91xmGPbiRnbX6lBLYAomn7No | |
I'm not responsible for what you do with these -- they may very well be backdoored |
public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null) | |
{ | |
using (db.Connection.EnsureOpen()) | |
{ | |
try | |
{ | |
return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList(); | |
} | |
catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906)) | |
{ |
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |