Skip to content

Instantly share code, notes, and snippets.

View clytras's full-sized avatar

Christos Lytras clytras

View GitHub Profile
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@clytras
clytras / TransformUtil.js
Created August 23, 2018 15:51 — forked from hpstuff/TransformUtil.js
ReactNativeTransformHelper
import MatrixMath from 'react-native/Libraries/Utilities/MatrixMath';
class TransformUtil {
constructor(matrix) {
this.matrix = matrix || MatrixMath.createIdentityMatrix();
}
perpective(x) {
MatrixMath.reusePerspectiveCommand(this.matrix, x)
Microsoft Windows [Version 10.0.10586]
]9;8;"USERNAME"\@]9;8;"COMPUTERNAME"\ C:\Users\zkr32
> ]9;12\e:
]9;8;"USERNAME"\@]9;8;"COMPUTERNAME"\ E:\
> ]9;12\cd E:\Programming\Android\ReactNative\ZKRTestSharedProject
]9;8;"USERNAME"\@]9;8;"COMPUTERNAME"\ E:\Programming\Android\ReactNative\ZKRTestSharedProject
> ]9;12\react-native run-android
Microsoft Windows [Version 10.0.10586] 
 
zkr32@ZKRWS C:\Users\zkr32 
> e: 
 
zkr32@ZKRWS E:\ 
> cd Programming\Android\ReactNative\ZKRTestSharedProject 

Microsoft Windows [Version 10.0.10586] 
 
zkr32@ZKRWS C:\Users\zkr32 
> cd E:\Programming\Android\ReactNative\ZKRTestSharedProject 
 
zkr32@ZKRWS C:\Users\zkr32 
> e: 

Microsoft Windows [Version 10.0.10586]
]9;8;"USERNAME"\@]9;8;"COMPUTERNAME"\ C:\Users\zkr32
$ ]9;12\dir
Volume in drive C is Windows
Volume Serial Number is A2EF-3521
Directory of C:\Users\zkr32
04/12/2017 04:17 μμ <DIR> .
@clytras
clytras / watchfiles.md
Created December 1, 2017 21:20 — forked from thiagoh/ watchfiles.md
watchfiles: Watch multiple files and execute bash commands as file changes occur

watchfiles

  • author: Thiago Andrade thiagoh@gmail.com
  • license: GPLv3
  • description:
  • watches the given paths for changes
  • and executes a given command when changes occur
  • usage:
  • watchfiles <paths...>
@clytras
clytras / quotes_json.js
Created March 15, 2017 08:49 — forked from mickaelandrieu/quotes_json.js
Scrap a website with CasperJs, JSON output.
var links = [];
var quotes = [];
var tempUrl = [];
var infos = [];
var maxLinks = 10;
var firstUrl = 'http://www.imdb.com/search/title?at=0&num_votes=5000,&sort=user_rating,desc&start=1&title_type=tv_infoss';
var newUrl;
var x = require('casper').selectXPath;
@clytras
clytras / gist:8afdbd1f4fd7088da5af9e66ff0e3d75
Created March 14, 2017 08:28 — forked from kbingman/gist:6557074
external include for casper.js login and preview
var require = patchRequire(require);
var loginAndPreview = function(baseUrl, bundleLocation, test){
casper.start('http://preview.mobify.com/', function suite() {
// Add a title comment so that you know what's happening and when
casper.test.comment('Lululemon - 2013 Refresh');
// Log out what we are doing
@clytras
clytras / nginx.conf
Created December 18, 2016 01:37 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";