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: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 / 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: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:4db1f636496025720a81
Last active August 29, 2015 14:02
serepate config for adhoc and production with titanium
// in config.json ------------------------------------------------------------------
{
"global": {
"dev": {
"feedback_mailto": "b@abctech-thailand.com",
"feedback_api": "http://kua.abcmedia.no/feedback/send"
},
"qa": {
"feedback_mailto": "mobile-team@startsiden.no",
"feedback_api": "http://kua.abcmedia.no/feedback/send"
@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: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/
#!/usr/bin/perl -w
use strict;
use CGI qw(:all);
use CGI::Carp qw(fatalsToBrowser);
my($requested_color, $old_color, $color_cookie) = ("","");
$old_color="blue"; # Default value
# Is there a new color requested?
if(defined param('color')) {
$requested_color = param('color');
}
@b-abctech
b-abctech / RomanConverter
Created May 13, 2013 10:10
Can't locate object method "ROMANS_TO_NUMBERS" via package "RomanConverter" at line 93
package RomanConverter;
use Moose;
use POSIX qw(floor);
use String::Util qw(trim);
use v5.10;
has 'NUMBERS_TO_ROMANS' => (
is => 'bare' ,
isa => 'Tree' ,
weak_ref => 1 ,
for my $method (qw(build_date bought_date)) {
Sub::Install::install($_ => sub {
my ($self, $input_arg) = @_;
return format_string($self->$method);
});
}
sub apejens {}
########################### config yml ###########################
---
name: SearchResponsive::EchoSlam
EchoSlam:
my_config:
channel_name: 'my_config_yml_channel'
########################### model ###########################
package SearchResponsive::EchoSlam;
use Moose;