This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
This file contains 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
<div class="tabs"> | |
<ul> | |
<li v-for="int in 2" class="ui-tabs-tab ui-corner-top ui-state-default ui-tab" | |
v-bind:class="[ picked == $index ? 'ui-state-active' : '']"> | |
<label class="ui-tabs-anchor">Tab-${ $index } | |
<input type="radio" name="tabs" value="${ $index }" v-model="picked" v-show="false"> | |
</label> | |
</li> | |
</ul> | |
<div v-for="w_type in wizard_types" v-show="( picked == $index )"> |
This file contains 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
insert into questions(article, name, email, text, hash, sale_location_id, created_at, updated_at ) select 1111111 as article, 'drew' as name, 'i@s.com' as email, md5(generate_series(1,10)::text) as text, md5(generate_series(1,10)::text) as hash, 'shop_r002' as sale_location_id, to_date(now()::text, 'YYYY-MM-DD HH:MI:SS') as created_at, to_date(now()::text, 'YYYY-MM-DD HH:MI:SS') as updated_at; |
This file contains 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
package singleton | |
import ( | |
"sync" | |
) | |
//http://marcio.io/2015/07/singleton-pattern-in-go/ | |
type singleton struct { | |
} |
This file contains 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
type FFiltersController struct { | |
Request *http.Request | |
Response http.ResponseWriter | |
} | |
type inputRequest struct { | |
Id int `json:"id"` | |
Url string `json:"url"` | |
SaleLocationId string `json:"sale_location_id"` | |
Categories []string `json:"categories"` |
This file contains 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
'{"url":"/lg-active3D-smart-tv"}' |
This file contains 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
............ | |
//another config placed in conf/prod/app.conf | |
func Init() { //old init() | |
//something like init database | |
} | |
func main() { | |
if beego.RunMode == "dev" { |
This file contains 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
siege -c15 -r2 'http://localhost:8000/api/v1/user_channel.get_sale_location POST {"session_id":"8888888888888", "channel":"MM", "sale_location_id":"shop"}' |
This file contains 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
$file = file($usersFile->getPathname()); | |
$header = str_getcsv(array_shift($file)); | |
$usersArray = array_map(function ($line) use ($header) { | |
$row = str_getcsv($line); | |
return (object)array_combine($header, $row); | |
}, $file); |
This file contains 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
sudo docker run -t -i ubuntu:12.04 | |
>do something | |
Ctrl-p + Ctrl-q | |
sudo docker ps -a | |
sudo docker commit 123432423 andboson/ubuntu:12.04.dev | |
sudo docker images | |
sudo docker run -t -i andboson/ubuntu:12.04.dev /bin/bash | |
>do something | |
Ctrl-p + Ctrl-q | |
sudo docker ps -a |