Skip to content

Instantly share code, notes, and snippets.

View nitaking's full-sized avatar

Satoshi Nitawaki nitaking

View GitHub Profile
@nitaking
nitaking / Main.cs
Last active February 9, 2016 08:26
リアルタイム編集によるプログラミング学習
public class Hello{
public static void Main(){
// Here your code !
// コメント
/* コメント */
double Sample1 = 5; //入居
double Sample2 = 10.1; //入居
double nothing; //不在
System.Console.WriteLine("Sample1 : " + Sample1);
# Here your code !
require 'gviz'
Graph do
route :Hubot
route :Kandan
route :GitLab, :GitLabCI
save(:nodes, :png)
end
@nitaking
nitaking / Main.php
Last active February 15, 2016 09:14
<?php
// Here your code !
// 出力文字列
$print = "";
$input = trim(fgets(STDIN));
$days = str_replace(array("\r\n","\r","\n"), '', $input);
$days = explode(" ", $days);
// コマンドライン引数処理
for($count = 0; $count < count($days); $count++){
@nitaking
nitaking / 2-1.swift
Last active February 18, 2016 14:19
[swift]基本構文覚え書き キャストとか ref: http://qiita.com/omochiiiY/items/3f0a7b8e7f7223a1c62a
let x = 1
var y = x + 2 * 3 / 2
print("y = \(y)") // y = 4
y %= 2
print("y mod 2 = \(y)") // y mod 2 = 0
@nitaking
nitaking / .kt
Last active February 9, 2018 14:09
[Kotlin]ことりんという言語に触れてみる ref: https://qiita.com/nitaking/items/1dad4b629c7a5cb15157
fun main(args: Array<String>) {
println("Hello, world!")
}
@nitaking
nitaking / UNION_ALLと同じ
Last active January 18, 2018 07:39
[Eloquent]Union()で重複行があるのでdistinctしたい ref: https://qiita.com/nitaking/items/82fe97fffee9bef14b49
$first = DB::table('users')
->whereNull('first_name')
->get();
$users = DB::table('users')
->whereNull('last_name')
->get()
->union($first);
@nitaking
nitaking / file0.txt
Last active January 18, 2018 03:39
ajaxでpostがgetにrewriteされる ref: https://qiita.com/nitaking/items/aea4f17a61c168d60f4a
...
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
...
...
function getMethodName(){
$data = 200;
logger(__method__ ,compact('data'));
}
...
// [2018-02-08 12:03:37] local.DEBUG: App\Libs\CartsUtil::getMethodName {"data":200}
<?php
/**
* 限りなくuniqueに近いUUIDを生成する
*/
namespace App\Libs;
class UUID {