Skip to content

Instantly share code, notes, and snippets.

TimNew timnew

Block or report user

Report or block timnew

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View json_convertible.rb
module JsonConvertible
extend ActiveSupport::Concern
included do
unless instance_methods(true).include?(:members) # Support Struct
def self.members(*attributes)
@members = [] if @members.nil?
unless attributes.empty?
attr_accessor(*attributes)
@timnew
timnew / script.py
Created Mar 31, 2018
TimNew's BitSlicer Multiple Code Block Script
View script.py
#Edit Infinite Aether!
#Introduction to scripting: https://github.com/zorgiepoo/Bit-Slicer/wiki/Introduction-to-Scripting
from bitslicer import VirtualMemoryError, DebuggerError
def locateSignature(signature):
debug.log("Searching signature...")
scanResult = vm.scanByteString(signature)
if len(scanResult) == 0:
debug.log("Signature cannot be found.")
@timnew
timnew / bit_slicer_cheat_template.code_injection.py
Last active Mar 29, 2019
TimNew's BitSlicer Single Code Block Script
View bit_slicer_cheat_template.code_injection.py
#Edit Me!
#Introduction to scripting: https://github.com/zorgiepoo/Bit-Slicer/wiki/Introduction-to-Scripting
from bitslicer import VirtualMemoryError, DebuggerError
def locateSignature(signature):
debug.log("Searching signature...")
scanResult = vm.scanByteString(signature)
if len(scanResult) == 0:
debug.log("Signature cannot be found.")
@timnew
timnew / Infinite AC.py
Last active Mar 31, 2018
Creeper World 2.12 Steam Mac Version BitSlicer Scripts
View Infinite AC.py
#Edit Infinite AC!
#Introduction to scripting: https://github.com/zorgiepoo/Bit-Slicer/wiki/Introduction-to-Scripting
from bitslicer import VirtualMemoryError, DebuggerError
def locateSignature(signature):
debug.log("Searching signature...")
scanResult = vm.scanByteString(signature)
if len(scanResult) == 0:
debug.log("Signature cannot be found.")
@timnew
timnew / replace_text_in_clipboard.sh
Created Sep 18, 2017
Automatically replace text in clipboard
View replace_text_in_clipboard.sh
while true; do pbpaste | sed -e "s/name:production-db/\$server-master/g" | sed -e "s/name:production-replicadb/\$server-replica/g" | pbcopy; sleep 1; done
@timnew
timnew / chinese_spam_filter.rb
Created Sep 7, 2017
A spam filter targeting on Chinese spammers!
View chinese_spam_filter.rb
class ChineseSpamFilter
class << self
def spam?(job)
tencent_email?(job.email) &&
(
in_cjk?(job.title, 0.2) ||
in_cjk?(job.company, 0.2)
)
end
@timnew
timnew / Profile.bash
Created Aug 8, 2017
Git Clean Squashed
View Profile.bash
git-clean-squashed='git checkout -q master && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
@timnew
timnew / 职称资格考试浏览器兼容性脚本.md
Last active Mar 20, 2016
职称资格考试浏览器兼容性脚本
View 职称资格考试浏览器兼容性脚本.md

http://ccatmc.com.cn/whb/cms/

  1. 登录页,需要干掉验证脚本
  2. 主页面需要去掉Frameset,单独打开iFrame
  3. 覆写报名页的脚本,修复各种兼容性问题
  4. 复写弹出页的脚本,填写完成后,读取 Console 中的 window.returnResult
  5. 报名页中调用 renderSubject(returnResult)
  6. 打印页没有savePdf脚本,直接打开iframe并保存为pdf
@timnew
timnew / ObservableMonitor.js
Last active Mar 15, 2016
RxJS Test Helper
View ObservableMonitor.js
class ObservableMonitor {
constructor(observable) {
this.observable = observable
this.promise = observable.materialize().toArray().toPromise()
}
complete(subject = this.observable) {
subject.onCompleted()
return this
You can’t perform that action at this time.