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
class CommentsController < ApplicationController | |
def create | |
@post = Post.find(params[:comment][:post_id]) | |
@comment = Comment.new | |
@comment.name = params[:comment][:name] | |
@comment.comment = params[:comment][:comment] | |
if verify_recaptcha(:model => @comment) && @comment.valid? | |
@post.comments << @comment | |
redirect_to :back, flash: {message: "Thank you for your comment "} | |
else |
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/sh | |
cd .; | |
ffmpeg -i $1 -vcodec copy -acodec copy temp.mkv; | |
CHARSET=`file -bi $2 | sed -e 's/.*[ ]charset=//'`; | |
if [ $CHARSET == "utf-8" ];then | |
cp $2 subtitle.srt; | |
else | |
iconv -f iso8859-15 -t UTF-8 $2 > subtitle.srt; | |
fi | |
mkvmerge -o $1.mkv temp.mkv --language "0:es" --track-name "0:mytrackname" -s 0 -D -A subtitle.srt; |
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
;; Global Include | |
(add-to-list 'load-path ".../git/contrib/emacs") | |
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp")) | |
;; Theme & Appearance | |
;;(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/emacs-deviant-theme") | |
;;(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/emacs-colors-solarized") | |
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/smyx-master") | |
(set-face-attribute 'default nil :height 108) ;; font size | |
(defun enable-custom-theme () |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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 | |
inc() | |
{ | |
shopt -s extglob | |
num=$(echo "$release_version" | sed 's/^\([0-9]*\)\.[0-9]*\.[0-9]*/\1/g') | |
let num++ | |
echo "$num.0.0" | |
} |
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 | |
inc() | |
{ | |
shopt -s extglob | |
num=$(echo "$release_version" | sed 's/^[0-9]*\.\([0-9]*\)\.[0-9]*/\1/g') | |
let num++ | |
echo $release_version | sed -r "s/^([0-9]*)\.[0-9]*\.[0-9]*$/\1.$num.0/" | |
} |
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
[alias] | |
brr = branch -r | |
br = branch | |
ci = commit -m | |
cia = commit -a -m | |
amend = commit --amend -C HEAD | |
co = checkout | |
cob = checkout -b | |
st = status -sb | |
me = merge --no-ff |
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 | |
inc() | |
{ | |
shopt -s extglob | |
num=$(echo "$release_version" | sed 's/^[0-9]*\.[0-9]*\.//g') | |
let num++ | |
echo $release_version | sed -r s/[0-9]*$/$num/ | |
} |
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
require 'rake/testtask' | |
Rake::TestTask.new do |t| | |
t.libs << ["spec", "lib" ] | |
t.pattern = "spec/**/*_spec.rb" | |
end |
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
source 'https://rubygems.org/' | |
gem 'minitest' |
OlderNewer