Skip to content

Instantly share code, notes, and snippets.

View h2ero's full-sized avatar

h2ero

  • Beijing,China
View GitHub Profile

Using online tools is essential in today's digital world for various reasons:

  1. Efficiency and Productivity: Online tools streamline tasks and processes, saving time and effort. They often provide automation features and collaboration capabilities that enhance productivity, enabling teams to work more efficiently.

  2. Accessibility: Online tools are accessible from anywhere with an internet connection. This flexibility allows professionals like you, a technical director, to work remotely or on-the-go, ensuring that you can stay connected to your projects and teams regardless of your location.

  3. Cost Savings: Many online tools offer cost-effective solutions compared to traditional software or hardware setups. As a technology professional, you appreciate the value of cost-efficient solutions that provide high-quality results.

  4. Real-time Collaboration: Online tools enable real-time collaboration among team members, making it easier to work on projects simultaneously, share information, and communicate eff

@h2ero
h2ero / c.md
Last active September 30, 2018 09:33

2222

23333

233333

// ==UserScript==
// @name light
// @namespace blog.h2ero.cn
// @include https://www.hi-pda.com/*
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// @grant none
// ==/UserScript==
var m = function (f) {
return f.toString().split('\n').slice(1, - 1).join('\n');
@h2ero
h2ero / pre-receive
Last active February 21, 2017 05:06 — forked from proofek/pre-receive
pre-receive git hook to run php linter
#!/usr/bin/php
<?php
echo "\nRunning php linter...\n";
$params = explode(' ', file_get_contents('php://stdin'));
$ref = trim($params[1]);
$diff = array();
$return = 0;
function del(id){
var url = 'http://weibo.com/aj/mblog/del?ajwvr=6';
var mid = id
var postData = {}
postData.mid = mid;
console.log(postData)
#!/bin/sh
# add it in dnsmasq.conf
# conf-file=/tmp/adblock.conf
wget -O - http://adblock-chinalist.googlecode.com/svn/trunk/adblock-lazy.txt | grep -E "^\|\|[^\*]*\^$" | sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' > /tmp/adblock.conf
//: [Previous](@previous)
import AppKit
import XCPlayground
extension NSLayoutConstraint {
convenience init(view item: NSView, to toItem: NSView, attribute: NSLayoutAttribute, constant c: CGFloat = 0) {
self.init(item: item, attribute: attribute,
relatedBy: .Equal,
toItem: toItem, attribute: attribute,
multiplier: 1.0, constant: c)
@h2ero
h2ero / gist:ccf90f3592b06d9510655902b274b61d
Created May 28, 2016 04:16 — forked from codler/gist:3906826
Support HTTP Header Range, mp4, php.php/mp4.mp4
<?php
# Nginx don't have PATH_INFO
if (!isset($_SERVER['PATH_INFO'])) {
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"]));
}
$request = substr($_SERVER['PATH_INFO'], 1);
$file = $request;
$fp = @fopen($file, 'rb');
$(function(){
var timeCol = ['creation_time','timestamp','payment_time', 'delivery_time','target_shipping_time'];
console.log(timeCol);
var ths = $('#right table tr:first th');
console.log(ths);
ths.each(function(index){
timeColElIndex = timeCol.indexOf($(this).text());
if(timeColElIndex !== -1){
$('#right table tr').each(function(){
var timeEl = $('td:eq('+index+')', $(this));
// ==UserScript==
// @name Gtranslator
// @namespace blog.h2ero.cn
// @version 2.0
// @description google 翻译及发音
// @include *
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// ==/UserScript==
var isen = 0;
$(function() {