This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static NSDictionary *inst = nil; | |
static dispatch_once_t onceToken = 0; | |
+(NSDictionary *) getStaticInfo{ | |
dispatch_once(&onceToken, ^{ | |
inst = @{ | |
@"": @[] | |
}; | |
}); | |
return inst; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 2048 | |
ssh -i /keypath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
More python client refer to https://github.com/appium/python-client | |
""" | |
import unittest | |
import os | |
from random import randint | |
from appium import webdriver | |
from time import sleep | |
class SimpleIOSTests(unittest.TestCase): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa -out key.pem | |
openssl req -new -key key.pem -out csr.pem | |
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem | |
rm csr.pem | |
more userful link: | |
https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server | |
http://shapeshed.com/command-line-utilities-with-nodejs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait PipeOperator[-T, +U]{ | |
def |> (data:T):Option[U] | |
} | |
class _FCT[+T](val _fct: T) { | |
def map[U](c: T => U): _FCT[U] = new _FCT[U]( c(_fct)) | |
def flatMap[U](f: T =>_FCT[U]): _FCT[U] = f(_fct) | |
//def filter(p: T =>Boolean): _FCT[T] = if( p(_fct) ) new _FCT[T](_fct) else zeroFCT(_fct) | |
def reduceLeft[U](f: (U,T) => U)(implicit c: T=> U): U = f(c(_fct),_fct) | |
def foldLeft[U](zero: U)(f: (U, T) => U)(implicit c: T=> U): U = f(c(_fct), _fct) | |
def foreach(p: T => Unit): Unit = p(_fct) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This function is from http://stackoverflow.com/questions/10596417/is-there-a-way-to-get-element-by-xpath-using-javascript-in-selenium-webdriver | |
function getElementByXpath(path) { | |
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} | |
console.log( getElementByXpath("//*[contains(text(), 'test')]")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android - unable to download js bundle | |
http://stackoverflow.com/questions/32572399/react-native-android-failed-to-load-js-bundle | |
"create an assets folder under android/app/src/main" | |
watchman issue | |
watchman shutdown-server | |
brew update && brew upgrade | |
brew uninstall --force watchman | |
brew install watchman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name postgres-jira -p 5432:5432 -e POSTGRES_PASSWORD=12345678 -v ~/atlassian/postgresql:/var/lib/postgresql/data -e POSTGRES_DB=jiradata -e POSTGRES_USER=jira -d postgres:9.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:comeonin, "~> 4.0"} | |
mix deps.get | |
|> put_pass_hash() |
OlderNewer