This file contains hidden or 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
useradd -m -g developer user | |
echo "password" | passwd user --stdin | |
(echo "password"; echo "password") | smbpasswd -s -a user |
This file contains hidden or 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
# https://github.com/neovim/neovim/wiki/Installing-Neovim | |
yum -y install epel-release | |
curl -o /etc/yum.repos.d/dperson-neovim-epel-7.repo https://copr.fedorainfracloud.org/coprs/dperson/neovim/repo/epel-7/dperson-neovim-epel-7.repo | |
yum -y install neovim --enablerepo=epel |
This file contains hidden or 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 | |
sudo yum -y install epel-release | |
sudo yum -y install haskell-platform --enablerepo=epel | |
cabal update | |
cabal install pandoc --force-reinstall |
This file contains hidden or 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
create user USER_NAME identified by 'password'; | |
grant all privileges on DB_NAME.* to 'USER_NAME'@'%'; |
This file contains hidden or 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
# Custom key mappings | |
map h goBack | |
map l goForward | |
map H previousTab | |
map L nextTab | |
map i LinkHints.activateMode | |
map I LinkHints.activateModeToOpenInNewTab |
This file contains hidden or 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
# MyApp.pm | |
package MyApp; | |
use Mojo::Base 'Mojolicious'; | |
use MyApp::Model; | |
has 'model' => sub {MyApp::Model->new}; | |
# MyModel | |
package MyApp::MyModel; | |
use Mojo::Base 'Mojolicious'; |
This file contains hidden or 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
sub getModuleVersion { | |
my $name = shift; | |
eval qq|use $name;1;|; | |
return $@ ? undef : eval qq|\$${name}::VERSION|; | |
} |
This file contains hidden or 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
sub writeFile{ | |
my( $path, $data, $mode) = @_; | |
$mode ? open( FH, ">>".$path) : open( FH, ">".$path); | |
binmode( FH); | |
print FH $data; | |
close( FH); | |
} |
This file contains hidden or 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
sub readFile{ | |
my $path = shift; | |
my( $ret, @ret); | |
open( FH, "<".$path); | |
if( wantarray){ | |
push( @ret, $_) foreach( <FH>); | |
}else{ | |
my $retcode = $/; | |
undef( $/); | |
$ret = <FH>; |
NewerOlder