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
| #!/bin/bash | |
| VERSION=2.15.0 | |
| sudo yum -y install wget tar curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker | |
| wget https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.gz | |
| tar -zxf git-$VERSION.tar.gz | |
| rm -rf git-$VERSION.tar.gz | |
| cd git-$VERSION | |
| make prefix=/usr/local all |
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
| #!/bin/bash | |
| cd | |
| mkdir -p script/git | |
| cd script/git | |
| wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh | |
| wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash | |
| cd | |
| cat << EOS >> .bashrc |
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) { |
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
| ;; 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
| # 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
| 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
| 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
| 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 division | |
| // Division is ... | |
| func Division(n float64) float64 { | |
| return n / 10 | |
| } | |
| // Multiplication is ... | |
| func Multiplication(n float64) float64 { | |
| return n * 0.1 |