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 ( | |
"net/http" | |
log "github.com/Sirupsen/logrus" | |
"github.com/gin-gonic/gin" | |
) | |
func main() { |
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
FROM alpine | |
COPY tz . | |
CMD ["sh"] |
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 division | |
// Division is ... | |
func Division(n float64) float64 { | |
return n / 10 | |
} | |
// Multiplication is ... | |
func Multiplication(n float64) float64 { | |
return n * 0.1 |
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 ( | |
"errors" | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/PuerkitoBio/goquery" | |
log "github.com/Sirupsen/logrus" |
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" | |
"github.com/ugorji/go/codec" | |
) | |
func main() { | |
material := "onion potato carrot" |
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
moment = require 'moment-timezone' | |
require 'moment-round' | |
# ... | |
getFilename = -> | |
moment() | |
.tz('Asia/Tokyo') | |
.floor(5, 'minutes') | |
# ^ <- ここ |
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
# Script to delete the image of imgur. | |
# | |
# client id - Client ID of imgur. | |
# delete hash - Delete hash of the uploaded image to imgur. | |
# | |
# Preparation | |
# | |
# Install dependencies package: | |
# $ npm install request | |
# |
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
;; Patch 24.5's `sgml-mode' with the new attribute offset feature. | |
(with-eval-after-load 'sgml-mode | |
(defcustom sgml-attribute-offset 0 | |
"Specifies a delta for attribute indentation in `sgml-indent-line'. | |
When 0, attribute indentation looks like this: | |
<element | |
attribute=\"value\"> |
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 | |
$m = null; | |
if (extension_loaded('memcached')) { | |
echo "use memcached.\n"; | |
$m = new Memcached(); | |
} elseif (extension_loaded('memcache')) { | |
echo "use memcache.\n"; | |
$m = new Memcache(); | |
} else { | |
echo "memcache and memcached is not installed.\n"; |
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 | |
use Yosymfony\Toml\Toml; | |
if (! function_exists('toml')) { | |
function toml($key = null) | |
{ | |
$toml = []; | |
$paths = glob('../application/configs/toml/*.toml'); | |
foreach ($paths as $path) { |