Skip to content

Instantly share code, notes, and snippets.

Jace wenjul

Block or report user

Report or block wenjul

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
@qianduan
qianduan / debug.conf
Last active Aug 29, 2015
disable x5 cache
View debug.conf
#Wed Feb 11 15:27:20 GMT+08:00 2015
setting_froceUseQProxy=false
setting_forceUseSystemWebview=false
@webtobesocial
webtobesocial / pseudo_elements.md
Last active May 15, 2019
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.
View pseudo_elements.md

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@alexhawkins
alexhawkins / HashTable.js
Last active May 10, 2019
Correct Implementation of a Hash Table in JavaScript
View HashTable.js
var HashTable = function() {
this._storage = [];
this._count = 0;
this._limit = 8;
}
HashTable.prototype.insert = function(key, value) {
//create an index for our storage location by passing it through our hashing function
var index = this.hashFunc(key, this._limit);
View PreventGhostClick.js
/**
* Prevent click events after a touchend.
*
* Inspired/copy-paste from this article of Google by Ryan Fioravanti
* https://developers.google.com/mobile/articles/fast_buttons#ghost
*
* USAGE:
* Prevent the click event for an certain element
* ````
* PreventGhostClick(myElement);
@OverZealous
OverZealous / 1 gulpfile.js
Last active May 26, 2016
Gulpfile for replicating ngboilerplate
View 1 gulpfile.js
//<editor-fold desc="Node Requires, gulp, etc">
var gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
csso = require('gulp-csso'),
debug = require('gulp-debug'),
footer = require('gulp-footer'),
gutil = require('gulp-util'),
gzip = require('gulp-gzip'),
@substack
substack / dotslashtaskdotjs.markdown
Created Jan 8, 2014
introducing ./task.js, THE new javascript task runner automation framework
View dotslashtaskdotjs.markdown

why ./task.js?

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

@jonbretman
jonbretman / type.js
Last active Jul 31, 2018
Simple type checking in JavaScript.
View type.js
(function (root) {
var type = function (o) {
// handle null in old IE
if (o === null) {
return 'null';
}
// handle DOM elements
@jamztang
jamztang / 1a-LiveCameraView.m
Last active May 23, 2018
My first hackathon experience - 12 hours of hacking and building the essentials. https://medium.com/p/3db44088db70
View 1a-LiveCameraView.m
- (void)viewDidLoad {
[super viewDidLoad];
self.videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionFront];
self.videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
// self.avatarView is a non full screen GPUImageView instance
// created in Storyboard
[self.videoCamera addTarget:self.avatarView];
[self.videoCamera startCameraCapture];
@wenjul
wenjul / index.html
Created Nov 22, 2012
Countdown Clock(翻页电子表)
View index.html
<div class="container">
<ul class="flip minutePlay">
<li>
<a href="#">
<div class="up">
<div class="shadow"></div>
<div class="inn">0</div>
</div>
<div class="down">
<div class="shadow"></div>
@axelpale
axelpale / combinations.js
Last active May 18, 2019
JavaScript functions to calculate combinations of elements in Array.
View combinations.js
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
You can’t perform that action at this time.