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
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Model Factories | |
|-------------------------------------------------------------------------- | |
| | |
| Here you may define all of your model factories. Model factories give | |
| you a convenient way to create models for testing and seeding your | |
| database. Just tell the factory how a default model should look. |
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
package main | |
import ( | |
"crypto/sha1" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"sort" | |
"strings" |
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
<?php | |
$name = 'John'; | |
$sayHello = function() { | |
return "Hello $name!"; | |
} | |
echo $sayHello('John'); // Hello ! |
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
center master ? git branch -r --merged | grep github | grep -v '>' | grep -v master | grep -v prod | xargs -L1 | cut -d"/" -f2- | xargs git push github --delete 1 ↵ | |
To [email protected]:doitian/center.git | |
- [deleted] 35_fix_serialize_json | |
- [deleted] bug/active_job_init | |
- [deleted] enhancement/app_store_client_middleware_stack | |
- [deleted] feature/app_store_invalid_receipts | |
- [deleted] feature/delete_elasticsearch | |
- [deleted] feature/nickname-in-auth-result | |
- [deleted] feature/retry_apple_validate_fail |
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
center master ? git branch -r --merged | grep github | grep -v '>' | grep -v master | grep -v prod | xargs -L1 | cut -d"/" -f2- | xargs git push github --delete 1 ↵ | |
To [email protected]:doitian/center.git | |
- [deleted] 35_fix_serialize_json | |
- [deleted] bug/active_job_init | |
- [deleted] enhancement/app_store_client_middleware_stack | |
- [deleted] feature/app_store_invalid_receipts | |
- [deleted] feature/delete_elasticsearch | |
- [deleted] feature/nickname-in-auth-result | |
- [deleted] feature/retry_apple_validate_fail |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
domain = 'example.com' | |
nodes = [ | |
{ :hostname => 'master1', :ip => '192.168.0.41'}, |
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
defmodule Hello do | |
defmacro __using__(_ops) do | |
quote do | |
IO.puts unquote(__MODULE__) | |
IO.puts __MODULE__ | |
import unquote(__MODULE__) | |
end | |
end | |
end |
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
defmodule B do | |
defmacro hello do | |
quote do | |
{:ok, v} = {:ok, "bbb"} | |
var!(v, B) | |
end | |
end | |
defmacro inspect_v do | |
quote do |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os/exec" | |
"path" | |
"github.com/gin-gonic/gin" |
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
bool TcpSocket::sendUIMessage(const char* data, int dataLength) | |
{ | |
if (this->getReadyState() != kTcpStateOpen) | |
{ | |
return false; | |
} | |
int dataLen = dataLength + sizeof(unsigned short) ; | |
char *buffer = new char[dataLen]; | |
memset(buffer, 0, dataLen); |