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
.ir { | |
background-color: transparent; | |
border: 0; | |
color: transparent; | |
font: 0/0 a; | |
text-shadow: none; | |
} |
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
function soft_cut_string($string, $length, $cut_string = '…') | |
{ | |
$new_string = $string; | |
if( mb_strlen($new_string) > $length ) | |
{ | |
$last_space_position = mb_strpos($new_string, " ", $length); | |
$new_string = mb_substr($new_string, 0, $last_space_position) . $cut_string; | |
} | |
return $new_string; |
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 core_config_data set value='http://ideal.development.local/' where config_id=24; | |
update core_config_data set value='https://ideal.development.local/' where config_id=26; | |
update core_config_data set value='https://ideal.lovepets.development.local/' where config_id=183; | |
update core_config_data set value='http://ideal.lovepets.development.local/' where config_id=183; | |
update core_config_data set value='https://ideal.lovepets.development.local/' where config_id=184; |
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 stopallvms='VBoxManage list runningvms | cut -d " " -f 1 | xargs -J % VBoxManage controlvm % savestate' | |
alias findinphp='find . -type f -name "*.php" | xargs grep -n' | |
alias what-did-i-work-on-recently='git log --abbrev-commit --date=short -100 --pretty=format:'%ae %ad %Cred%h%Creset -%C(yellow)%d%Creset %C(bold blue)%s%Creset' | grep "<YOUR-GITHUB-EMAIL>" | grep -oE "\d{4}.*"' | |
alias vless='vim -u /usr/share/vim/vim73/macros/less.vim' |
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
$ gem install proxylocal | |
# Into Vagrantfile: | |
# config.vm.network "forwarded_port", guest: 80, host: 8080 | |
$ vagrant reload | |
# In new terminal window: | |
$ proxylocal 8080 | |
# You can copy the forwarded URL from the output. The forwarding lives until you terminate the process. |
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
# Convert m4a to mp3 | |
ffmpeg -i audioFile.m4a -codec:v copy -codec:a libmp3lame -q:a 2 audioFile.m4a.mp3 | |
# Download extracted audio content from youtube video | |
youtube-dl -x "Youtube-link" | |
# Find and replace "Oldcontent" to "Newcontent" in FILENAME | |
sed -i.bak s%Oldcontent%Newcontent%g FILENAME | |
# Replace a word with another in all file under a directory structure |
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 | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/1237417 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
make bzip2 autoconf automake libtool bison iconv-devel git-core |
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
default_run_options[:pty] = true | |
ssh_options[:forward_agent] = true | |
ssh_options[:auth_methods] = ["publickey"] | |
ssh_options[:keys] = ["~/.ssh/key.pem"] |
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
$("input").keypress(function(event) { | |
if (event.which == 13) { | |
event.preventDefault(); | |
$(this).closest("form").submit(); | |
} | |
}); |
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
(function($) { | |
$(document).ready(function() { | |
}); | |
})(jQuery); |
OlderNewer