Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name tingxie
// @namespace https://gist.github.com/iron9light/155fb046393b504304b54a1e855715e6
// @version 0.1.21
// @description Ting Xie
// @author iron9light
// @match https://www.youtube.com/watch*
// @grant none
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/immutable/3.8.2/immutable.min.js
// ==UserScript==
// @name Danmu
// @namespace https://gist.github.com/iron9light/706351eaf4adaa4857275ac0f2a5dfea
// @version 0.1.3
// @description try to take over the world!
// @author You
// @match https://www.douyu.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.4.1.slim.min.js
// @require https://raw.githubusercontent.com/Keyframes/jQuery.Keyframes/master/dist/jquery.keyframes.min.js
List(###, # Generic proguard options useful in non-release builds, ###, -dontobfuscate, , -renamesourcefileattribute SourceFile, -keepattributes SourceFile,LineNumberTable,Signature, , -flattenpackagehierarchy, , -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*,!code/allocation/variable, , -dontnote android.support.**, -dontnote org.apache.http.**, -dontnote android.net.http.**, -dontnote android.annotation.**, , -dontnote com.android.vending.licensing.**, -dontnote com.google.vending.licensing.**, , ###, # Scala-specific proguard config, ###, -dontnote scala.concurrent.util.Unsafe, -dontnote scala.Enumeration**, -dontnote scala.ScalaObject, -dontnote org.xml.sax.EntityResolver, -dontnote scala.concurrent.forkjoin.**, -dontwarn scala.beans.ScalaBeanInfo, -dontwarn scala.concurrent.**, -dontnote scala.reflect.**, -dontwarn scala.reflect.**, -dontwarn scala.sys.process.package$, -dontwarn **$$anonfun$*, -dontwarn scala.collection.immutable.RedBlack$Empty, -dontw
@iron9light
iron9light / FieldSerializer2.scala
Created September 24, 2012 08:17
a json-lift Serializer to replace field name.
package sandbox
import net.liftweb.json._
case class FieldSerializer2[A: Manifest](
serializer: PartialFunction[(String, Any), Option[(String, Any)]] = Map(),
deserializer: PartialFunction[JField, JField] = Map()
) extends Serializer[A] {self =>
val Class = implicitly[Manifest[A]].erasure
@iron9light
iron9light / MixedTypeArrayJsonSuite.scala
Created July 19, 2012 05:51
lift json serializing mixed type array
package net.liftweb.sandbox
import org.scalatest.FunSuite
import net.liftweb.json._
import org.scalatest.matchers.ShouldMatchers
/**
* @author IL
* @see <a href="https://groups.google.com/forum/?fromgroups#!topic/liftweb/GK5DbzCtWdA">forum</a>
*/
@iron9light
iron9light / finalize.js
Created February 10, 2012 06:43
Get random records form mongodb via map/reduce
function(k, v) {
return v.a ? v.a.map(function(x) {
return x.k
}) : [v.k]
}
@iron9light
iron9light / Taggable.scala
Created September 6, 2011 18:23
Tag helper for squeryl
package iron9light.lessTM.business.lib
import scala.collection.mutable.Map
import org.squeryl.PrimitiveTypeMode._
import org.squeryl.{Schema, Table, KeyedEntity}
import org.squeryl.dsl.ast.{EqualityExpression, TypedExpressionNode}
import org.squeryl.dsl.{OneToManyRelation, ManyToOne, OneToMany, CompositeKey3}
import java.sql.Timestamp
import java.util.{UUID, Date}
@iron9light
iron9light / decoder.js
Created September 3, 2011 16:08
Windows jscript base64 decoder. Decode all oo.xx.exe to oo.xx. Just double click.
foForReading = 1 // Open base 64 code file for reading
foAsASCII = 0 // Open base 64 code file as ASCII file
adSaveCreateOverWrite = 2 // Mode for ADODB.Stream
adTypeBinary = 1 // Binary file is encoded
function decode(from, to) {
var fileSystemObj = WScript.CreateObject("Scripting.FileSystemObject");
var file = fileSystemObj.GetFile(from)
var inputStream = file.OpenAsTextStream(foForReading, foAsASCII);
@iron9light
iron9light / encoder.js
Created September 3, 2011 16:07
Windows jscript base64 encoder. Drag and drop files you wanna encode to this .js file.
var fsDoOverwrite = true // Overwrite file with base64 code
var fsAsASCII = false // Create base64 code file as ASCII file
var adTypeBinary = 1 // Binary file is encoded
function encode(from, to) {
var inputStream = WScript.CreateObject("ADODB.Stream");
inputStream.Type = adTypeBinary
inputStream.Open();
inputStream.LoadFromFile(from);