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
TypeScript 24 hrs 37 mins ████████████████▊░░░░ 79.8% | |
Markdown 2 hrs 45 mins █▉░░░░░░░░░░░░░░░░░░░ 9.0% | |
JSON 2 hrs 38 mins █▊░░░░░░░░░░░░░░░░░░░ 8.6% | |
Other 33 mins ▍░░░░░░░░░░░░░░░░░░░░ 1.8% | |
Bash 8 mins ░░░░░░░░░░░░░░░░░░░░░ 0.5% |
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
// @flow | |
import React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
View, | |
PanResponder, | |
} from 'react-native'; | |
type State = { |
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
// @flow | |
import React, { Component } from 'react'; | |
import { | |
Platform, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
TouchableHighlight, |
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
module Module1 | |
def self.method1 | |
puts "method1 is called." | |
end | |
end | |
class Test | |
def self.method_missing(name, *args) | |
if Module1.method_defined?(name) | |
puts "don't call me!!!!!" |
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/sh | |
# move this file to /etc/init.d/monit | |
### BEGIN INIT INFO | |
# Provides: monit | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Should-Start: $all | |
# Should-Stop: $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
<?php | |
/** | |
* Conyac API Client for PHP | |
* @author gaishimo | |
*/ | |
class Conyac{ | |
private $apiDomain; | |
private $clientId; |
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/sh | |
if [ $# -lt 1 ]; then echo "Usage: add_ssh_public_key.sh <host> [<user>] [<port>]"; exit 1; fi | |
HOST=$1 USER=$2 PORT=$3 | |
if [ -z $USER ]; then USER=`whoami`; fi | |
if [ -z $PORT ]; then PORT=22; fi | |
STATUS=`cat ~/.ssh/id_rsa.pub | | |
ssh -p $PORT $USER@$HOST "sh -c 'cat - >> ~/.ssh/authorized_keys; echo \\$?'"` | |
if [ "$STATUS" != "0" ]; then |
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
$ bundle exec rspec spec/requests/user_pages_spec.rb \ | |
-e "signup with invalid information" |
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
respond_to do |format| | |
if @magazine.save | |
format.html { redirect_to @magazine, notice: 'Magazine was successfully created.' } | |
format.json { render json: @magazine, status: :created, location: @magazine } | |
else | |
format.html { render action: "new" } | |
format.json { render json: @magazine.errors, status: :unprocessable_entity } | |
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
SHOW VARIABLES like '%time_zone%'; | |
SET GLOBAL time_zone = '+9:00'; |
NewerOlder