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
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
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
protocol Greeter { | |
func greet() -> String | |
} | |
protocol エンジニャー { | |
func meo() | |
} | |
class Person: Greeter { | |
var name: String = "kitamura" |
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
(gdb) continue | |
Continuing. | |
Program received signal SIGSEGV, Segmentation fault. | |
0x000000000070ff48 in zend_std_object_get_class (object=0x35cfb78) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_object_handlers.c:1499 | |
1499 /build/buildd/php5-5.5.9+dfsg/Zend/zend_object_handlers.c: No such file or directory. |
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
def changed(file_path) | |
notify File.open(file_path, "rb").read | |
end | |
def notify(result) | |
messages = result.split("\n") | |
title = messages.shift | |
group = messages.shift | |
info = messages.join("\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
upstream backend { | |
server 127.0.0.1:3001; | |
} | |
# http://henteco-labs.com/labs/2014/04/14/rails-nginx/ | |
server { | |
location / { | |
try_files $uri @proxy; | |
} |
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
upstream backend { | |
server unix:/home/vagrant/prj/blog/tmp/sockets/puma.sock; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /home/vagrant/prj/blog/public; | |
index index.html; |
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 | |
# http://www.unicode.org/charts/PDF/U1E00.pdf | |
$targets = [ | |
'aắằặấầẩậẳẵạàáâãảăẫ', | |
'eẽẹếềểễệèéêẻ', | |
'oốồổỗộờởơớỡòóôõỏọợ', | |
'iịìíĩỉ', | |
'uứừửưữựụùúũủ', | |
'yỳỷỹỵý' |
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
mkdir mydockerbuild | |
cd mydockerbuild | |
vi Dockerfile | |
FROM library/ubuntu:16.04 | |
RUN apt-get -y update && apt-get install -y build-essential git silversearcher-ag python libssl-dev | |
CMD date | |
docker build -t echo-date . | |
docker images |
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
# Dockerfile | |
------------------ | |
FROM library/ubuntu:16.04 | |
RUN apt-get -y update && apt-get install -y build-essential git python libssl-dev curl | |
# install nodebrew, node | |
ENV NODEBREW_ROOT=/usr/local/nodebrew | |
ENV PATH=/usr/local/nodebrew/current/bin:$PATH | |
RUN export NODE_VERSION=v4.3.2 && curl -L git.io/nodebrew | perl - setup \ | |
&& nodebrew install-binary $NODE_VERSION \ |
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
# spec/models/cat_spec.rb | |
require 'rails_helper.rb' | |
RSpec.describe Cat, type: :model do | |
# this is a test target model | |
let(:cat) { Cat.new(status: status) } | |
# this block describes Cat#nyan instance method | |
# when you reference an instance method, write `Class#method` | |
# and for a class method, write 'Class.method' |