Skip to content

Instantly share code, notes, and snippets.

View b-abctech's full-sized avatar

Pussaaon b-abctech

  • abc-tech thailand
  • Bangkok
View GitHub Profile
@b-abctech
b-abctech / gist:e531ca919eda8da0bfb7
Created September 29, 2014 07:15
Running test bash
#!/bin/bash
cd $APPIUM_HOME
node . &> /dev/null &
cd $HOME/Works/Workspaces/mobile-team/startsiden-app/
ti build -p ios -f -b
ti build -p android -f -b
rm -rf test/appium/build/ios/*
rm -rf test/appium/build/android/*
cp -RfX build/iphone/build/Debug-iphonesimulator/* test/appium/build/ios/
@b-abctech
b-abctech / gist:35bc449a0cf673fba406
Last active August 29, 2015 14:06
build titanium for ios
ti build -p ios -T dist-adhoc -R <certificate> -P <provisioning id> -O <output path>
sample:
ti build -p ios -T dist-adhoc -R "ABC Startsiden AS (R87Q7ZL5GR)" -P 462F2756-4BCA-4AEC-B43E-D7C2F9BD3AFB -O /Users/B-Pussaaon/Desktop/
@b-abctech
b-abctech / gist:4db1f636496025720a81
Last active August 29, 2015 14:02
serepate config for adhoc and production with titanium
// in config.json ------------------------------------------------------------------
{
"global": {
"dev": {
"feedback_mailto": "[email protected]",
"feedback_api": "http://kua.abcmedia.no/feedback/send"
},
"qa": {
"feedback_mailto": "[email protected]",
"feedback_api": "http://kua.abcmedia.no/feedback/send"
@b-abctech
b-abctech / gist:9463097
Last active August 29, 2015 13:57
perlbrew install log error
Auto-guessed '5.19.9'
2
3 Beginning of configuration questions for perl5.
4
5 Checking echo to see how to suppress newlines...
6 ...using \c
7 The star should be here-->*
8
9 First let's make sure your kit is complete. Checking...
10 Looks good...
@b-abctech
b-abctech / gist:9246856
Last active August 29, 2015 13:56
banner result from emediate
<html>
<head>
<script>
function a(b) {
this.t = {};
this.tick = function(b, f, d) {
this.t[b] = [void 0 != d ? d : (new Date).getTime(), f]
};
this.tick("start", null, b)
@b-abctech
b-abctech / gist:8949941
Last active August 29, 2015 13:56
bing with perl sample
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use JSON;
my $query = 'Norway';
my $ua = LWP::UserAgent->new;
my $account_key = 'VHqbZUljwrsMUrVUBjTMPVD1SaY4aReHQYBPtk8dcGg=';
@b-abctech
b-abctech / bingsearchphp
Last active January 4, 2016 21:49
Bing search php
<?php
/****
* PHP proxy for using the Bing Search API with AJAX
*/
$acctKey = 'xxx';
@b-abctech
b-abctech / gist:8216896
Created January 2, 2014 09:35
sending mail in text/html with Catalyst::View::Email::Template
# 1. first install module Catalyst::View::Email::Template, Catalyst::View::Email
# 2. create email template view
# 3. in config add these
View::Email::Template:
template_prefix: email
default:
view: HTML
content_type: text/html
@b-abctech
b-abctech / gist:7998907
Created December 17, 2013 02:20
Search query string like with multiple fields
GET /stories/fairytale/_search
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"or": [
{
@b-abctech
b-abctech / gist:7998889
Created December 17, 2013 02:19
detect click event on menu to add or remove class from the elements
<!-- 1. first create the menu list -->
<ul class="my-menu">
<li data-id="id-1" class="menu current">
<a href="#">hello world 1</a>
</li>
<li data-id="id-2" class="menu">
<a href="#">hello world 2</a>
</li>
<li data-id="id-3" class="menu">
<a href="#">hello world 3</a>