Skip to content

Instantly share code, notes, and snippets.

View iplus26's full-sized avatar
:shipit:
Looking for fun

Ivan Jiang iplus26

:shipit:
Looking for fun
  • Tencent
View GitHub Profile
@iplus26
iplus26 / min-heap.ts
Last active July 28, 2021 14:53
Heap implementation using TypeScript
class MinHeap {
readonly nodes: number[];
constructor(private size: number) {
this.nodes = [null];
}
getMin(): number {
return this.nodes[1];
}
@iplus26
iplus26 / tencent-video-give-my-hotkey-back.user.js
Last active May 6, 2019 12:32
一个 Tampermonkey 脚本来防止腾讯视频劫持 Chrome 快捷键
// ==UserScript==
// @name tencent-video-give-my-hotkey-back
// @description 一个 Tampermonkey 脚本来防止腾讯视频劫持 Chrome 快捷键
// @include https://v.qq.com/*
// @include http://v.qq.com/*
// @version 0.0.4
// ==/UserScript==
!(function() {
$(function() {
setTimeout(function() {
@iplus26
iplus26 / MySQL.md
Last active July 9, 2019 15:23
Install MySQL using Homebrew in macOS 10.11 El Capitan
@iplus26
iplus26 / AngularDI.html
Created July 25, 2016 09:41
Angular 中插入依赖的几种方式
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body ng-app="mod">
@iplus26
iplus26 / index.html
Created July 22, 2016 07:59
Angular Dependency 在调用“后”申明
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div ng-app="app">
@iplus26
iplus26 / index.html
Created July 3, 2016 05:27
This gist is created by Ivan Jiang and used to test whether service and factory in AngularJS is singleton or not.
<!DOCTYPE html>
<html ng-app='myApp'>
<head>
<meta name="description" content="This jsbin is created by Ivan Jiang and used to test whether service and factory in AngularJS is singleton or not. ">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script src="singletonLog.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Test AngularJS Singleton Service/Factory</title>
</head>
@iplus26
iplus26 / 磐石投票半手动刷票脚本
Last active December 19, 2019 15:14
磐石投票(http://www.stonepoll.com) 半手动刷票脚本,自动打开 Safari 无痕模式,输入网址,勾选目标选项,页面滚动至验证码处
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Private Window" of menu "File" of menu bar 1
end tell
end tell
tell front window of application "Safari"
set the URL of the current tab to "http://pvote.v.mvote.net/poll/067cd4ee-49c3-90e6-4855-28386dfd4576.html?from=timeline&isappinstalled=0"
--这里是网址