This file contains 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
" compile POVRay script being currently edited, clear output and open the resulting .png ONLY when povray complilation succeeds. | |
command Povray !povray % && clear && feh %<.png | |
" delete the generated .png when exiting from .pov file of the same name. | |
autocmd BufWinLeave *.pov :!rm %<.png |
This file contains 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
func wordRangeAtIndex(index:Int, inString str:NSString) -> NSRange { | |
let tagger = NSLinguisticTagger(tagSchemes: [NSLinguisticTagSchemeTokenType], options: 0) | |
var r : NSRange = NSMakeRange(0,0) | |
tagger.string = str as String | |
tagger.tagAtIndex(index, scheme: NSLinguisticTagSchemeTokenType, tokenRange: &r, sentenceRange: nil ) | |
return r | |
} | |
func wordAtIndex(index:Int, inString str:NSString) -> NSString { | |
return str.substringWithRange(wordRangeAtIndex(index, inString: str)) |
This file contains 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 | |
namespace Cake\Mailer\Transport; | |
use Cake\Mailer\AbstractTransport; | |
use Cake\Mailer\Email; | |
use Mailgun; | |
/** | |
* Send mail using Mailgun |
This file contains 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
public class AutofacConfig | |
{ | |
public static void Configure() | |
{ | |
var builder = new ContainerBuilder(); | |
builder.RegisterType<ApplicationDbContext>().AsSelf().InstancePerLifetimeScope(); | |
builder.RegisterType<ApplicationUserStore>().As<IUserStore<PortalUser>>().InstancePerLifetimeScope(); | |
builder.RegisterType<ApplicationUserManager>().AsSelf().InstancePerLifetimeScope(); | |
builder.RegisterType<ApplicationSignInManager>().AsSelf().InstancePerLifetimeScope(); |
This file contains 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 | |
# 判斷是否為 root 身份 | |
if [ "`whoami`" != "root" ]; then | |
echo "You may use root permission!" | |
exit 1 | |
fi | |
# 安裝必要軟體 | |
apt-get install -y git | |
apt-get install -y pidgin |
This file contains 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
http://blog.hashrocket.com/posts/feature-development-with-git-branching |
This file contains 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
import struct | |
BLOCK_DIVIDER = 10 | |
LENGTH_OF_BLOCK = 11 | |
MODE_OF_OPERATION = 12 | |
VCP = 14 | |
ELEVATION_CUTS = 15 | |
ELEVATION_01 = 16 | |
ELEVATION_02 = 17 | |
ELEVATION_03 = 18 |
This file contains 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
#loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
This file contains 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
[keita@ip-172-31-28-2 toy_app]$ git add -A | |
[keita@ip-172-31-28-2 toy_app]$ git commit -m "修正" | |
[master 18f8fa6] 修正 | |
[keita@ip-172-31-28-2 toy_app]$ git remote add origin https://github.com/keita03301995/toy_app.git | |
fatal: remote origin already exists. | |
[keita@ip-172-31-28-2 toy_app]$ git push -u origin master | |
Username for 'https://github.com': keita03301995 | |
Password for 'https://keita03301995@github.com': | |
Counting objects: 145, done. | |
Compressing objects: 100% (129/129), done. |
This file contains 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
<html><head><style> | |
.main .line { | |
clear: both; | |
} | |
.main .line div { | |
width: 20px; | |
height: 20px; | |
float: left; | |
margin: 1px; | |
border: 1px solid #ddd; |
OlderNewer