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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var sass = require('gulp-sass'); | |
var prefix = require('gulp-autoprefixer'); | |
var cp = require('child_process'); | |
var messages = { jekyllBuild: '<span style="color: grey">Running:</span> $ jekyll build' }; | |
// Build the Jekyll Site |
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
# allows code pygmentation | |
gem 'pygments.rb' | |
# allows markdown functionality | |
gem 'redcarpet' |
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
<body class="<%= "#{controller.controller_name} #{controller.action_name}".strip %>"> |
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
update_option( 'siteurl', 'http://example.com' ); | |
update_option( 'home', 'http://example.com' ); | |
// Allow editors to see Appearance menu | |
$role_object = get_role( 'editor' ); | |
$role_object->add_cap( 'edit_theme_options' ); | |
function hide_menu() { | |
// Hide theme selection page | |
remove_submenu_page( 'themes.php', 'themes.php' ); |
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
# make postgresql database on server | |
sudo su - postgres | |
psql | |
CREATE DATABASE appname_production; | |
CREATE USER appname_user WITH PASSWORD 'th3f1r3w1th1n'; | |
GRANT ALL PRIVILEGES ON DATABASE appname_production TO appname_user; | |
\q | |
exit | |
# generate secret in local project root for production |
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
lsof -wni tcp:3000 | |
kill -9 PID | |
$ ps aux | grep spring | |
returned: | |
ubuntu 3271 0.0 0.0 569224 16672 pts/6 Sl 01:11 0:00 spring server | mh03_sample_app | started 3 hours ago | |
ubuntu 9265 94.3 0.1 468460 73160 ? Rsl 04:20 0:02 spring app | mh03_sample_app | started 2 secs ago | test mode | |
Killing the spring server: | |
$ kill -15 3271 |
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
You might also find it useful to know generally what these data types are used for: | |
:string - is for small data types such as a title. (Should you choose string or text?) | |
:text - is for longer pieces of textual data, such as a paragraph of information | |
:binary - is for storing data such as images, audio, or movies. | |
:boolean - is for storing true or false values. | |
:date - store only the date | |
:datetime - store the date and time into a column. | |
:time - is for time only | |
:timestamp - for storing date and time into a column.(What's the difference between datetime and timestamp?) |
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
Date (Year, Month, Day): | |
%Y - Year with century (can be negative, 4 digits at least) | |
-0001, 0000, 1995, 2009, 14292, etc. | |
%C - year / 100 (round down. 20 in 2009) | |
%y - year % 100 (00..99) | |
%m - Month of the year, zero-padded (01..12) | |
%_m blank-padded ( 1..12) | |
%-m no-padded (1..12) | |
%B - The full month name (``January'') |
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
"ActivateAddons vim-snippets snipmate | |
autocmd BufReadPost,FileReadPost,BufNewFile,BufEnter * call system("tmux rename-window ':vim => \"" . expand("%:t") . "\"'") | |
"autocmd VimLeave * call system("tmux rename-window 'tmux'") | |
autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 | |
color dracula | |
let g:airline_theme='dracula' |
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
# Tmux prefix...most people use Control-A | |
set-option -g prefix C-f | |
#No delay when hitting escape key | |
set -sg escape-time 0 | |
#No or little delay in repeat time | |
set-option -g repeat-time 500 | |
set -g mouse on |
OlderNewer