Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
Looking for interesting projects

Zhu Liang paradite

👀
Looking for interesting projects
View GitHub Profile
View xctest-client.js
'use strict';
const fs = require('fs');
const url = require('url');
const path = require('path');
const iOSUtils = require('ios-utils');
const EventEmitter = require('events');
const childProcess = require('child_process');
const _ = require('./helper');
View ul
https://play.google.com/store/apps/details?id=com.twitter.android
@paradite
paradite / tester.js
Created Nov 4, 2018 — forked from freedmand/tester.js
JavaScript unit testing in under 30 lines
View tester.js
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@paradite
paradite / .travis.yml
Created Dec 16, 2017 — forked from willprice/.travis.yml
How to set up TravisCI for projects that push back to github
View .travis.yml
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
View font-awesome social round icons css.md
@paradite
paradite / app.js
Created Oct 24, 2016 — forked from Turbo87/app.js
webpack + font-awesome test
View app.js
require('font-awesome/css/font-awesome.css');
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>';
View keybase.md

Keybase proof

I hereby claim:

  • I am paradite on github.
  • I am paradite (https://keybase.io/paradite) on keybase.
  • I have a public key whose fingerprint is D52F 27FD B7CC 54ED F503 2B02 4F0E 079D 382E E914

To claim this, I am signing this object:

@paradite
paradite / paste.js
Last active Sep 13, 2019
intercept paste and do formatting in JavaScript (in Angular.js)
View paste.js
// tested in Chrome and Firefox
this.onPaste = function (event) {
if($(event.target).is(':focus')) {
// actually typing on the element, stop paste progation to outside paste handler
event.stopPropagation();
// intercept paste and format the text
event.preventDefault();
var newText = (event.originalEvent || event).clipboardData.getData('text/plain');
newText = newText.replace(/\r?\n/g, ' ');
@paradite
paradite / README.md
Created Feb 20, 2016 — forked from oodavid/README.md
Deploy your site with git
View README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
    • apache's home directory is /var/www/
@paradite
paradite / content-page.php
Last active Dec 1, 2016
WP suits theme updated field
View content-page.php
<?php
/**
* The template used for displaying page content in page.php
*
* @package Suits
* @since Suits 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>