Skip to content

Instantly share code, notes, and snippets.

@vutran0111
vutran0111 / laravellocal.md
Created March 6, 2018 02:48 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
{
"keen": {
"timestamp": "2017-10-27T09:11:42.000Z",
"created_at": "2017-10-27T09:17:07.330Z",
"id": "59f2f993b05c3f00015c7b8c"
},
"properties": {
"source_name": "pos",
"reference": "D513A9F7-4C8C-410C-B89B-77248D7A4748",
"shipping_lines": [],
@vutran0111
vutran0111 / a.md
Last active October 23, 2017 08:07
{
"id":18614140557,
"token":"f3f7b96cfeb8b7f24bb695d6462cd008",
"cart_token":null,
"email":"",
"gateway":null,
"buyer_accepts_marketing":false,
"created_at":"2017-10-20T00:04:59-04:00",
"updated_at":"2017-10-20T00:04:59-04:00",
"landing_site":"\/24059351\/invoices\/e984d696a0a4ae9e8b0577ee2c403f2b",
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
// center: {lat: 42.9456, lng: -122.2},
// center: { lat: 10.7663468, lng: 106.6589143 },
zoom: 14
});
infoWindow = new google.maps.InfoWindow;
// Geolocation.
if (navigator.geolocation) {
@vutran0111
vutran0111 / map.html
Created October 11, 2017 09:21 — forked from phirework/map.html
Create a Google map using JSON data with check-box filtering for categories. Map data set-up: name, url, place (address), ltt (latitude), lgt (longitude), cat (category). Set up custom icons that correspond to the name of each category in PNG format. Sample: http://dev.phirephoenix.com/map/maps.html
<div id="map" style="width: 550px; height: 450px"></div>
<form action="#">
Eat: <input type="checkbox" id="eatbox" onclick="boxclick(this,'eat')" /> &nbsp;&nbsp;
Stay: <input type="checkbox" id="staybox" onclick="boxclick(this,'stay')" /> &nbsp;&nbsp;
Shop: <input type="checkbox" id="shopbox" onclick="boxclick(this,'shop')" />&nbsp;&nbsp;
Play: <input type="checkbox" id="playbox" onclick="boxclick(this,'play')" />&nbsp;&nbsp;
Community: <input type="checkbox" id="communitybox" onclick="boxclick(this,'community')" /><br />
</form>
user_id='iden1'
event_name = "new_event"
hook_data= {
"anonymousId"=>nil,
"channel"=>"server",
"context"=>{"library"=>{"name"=>"simple_segment", "version"=>"0.1.1"}},
"event"=>event_name,
"integrations"=>{},
"messageId"=>"api-bV5ZmieDrhHeMrqwsAqqUytqWec3q6EY",
"originalTimestamp"=>"2017-09-10T00:32:29+08:00",
{
"member": {
"sources": {
"dummysource1": {
"traits": {
"age": "20.0",
"avatar": "avatar_url_11",
"email": "[email protected]"
},
"uids": {
@vutran0111
vutran0111 / index.md
Created August 8, 2017 04:20 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one