#我的 Vim 指令筆記
##vim 的三種模式 ###模式
輸入模式
:輸入內文。指揮模式
:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。執行模式
:文件存檔,離開等等行為。
###常用模式的切換
- 輸入模式 -> 指揮模式 : 鍵盤
Esc
/** | |
* Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
* | |
* insertOrUpdate([ | |
* ['id'=>1,'value'=>10], | |
* ['id'=>2,'value'=>60] | |
* ]); | |
* | |
* | |
* @param array $rows |
<?php | |
final class EmailValueObject | |
{ | |
private $mailbox; | |
private $host; | |
public function __construct($email) | |
{ | |
if (false === strpos($email, '@')) { |
#我的 Vim 指令筆記
##vim 的三種模式 ###模式
輸入模式
:輸入內文。指揮模式
:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。執行模式
:文件存檔,離開等等行為。###常用模式的切換
Esc
# ~/.profile: executed by the command interpreter for login shells. | |
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |
# exists. | |
# see /usr/share/doc/bash/examples/startup-files for examples. | |
# the files are located in the bash-doc package. | |
# the default umask is set in /etc/profile; for setting the umask | |
# for ssh logins, install and configure the libpam-umask package. | |
#umask 022 |
FROM ubuntu:16.04 | |
ENV TZ=Australia/Melbourne | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN dpkg-reconfigure --frontend noninteractive tzdata |
Reference:
sudo fdisk -l
/* MODELS */ | |
var ProjectCollection = function(projects){ | |
var self = this; | |
var projects = projects; | |
this.create = function(attrs){ | |
projects.push(attrs) | |
// might want to a bit of ajax here |
#!/usr/local/bin/python3 | |
''' | |
Convert a pkl file into json file | |
''' | |
import sys | |
import os | |
import _pickle as pickle | |
import json | |