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 user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9-_]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |
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
(app)dilipray@app$ python manage.py syncdb | |
Creating tables ... | |
Creating table auth_permission | |
Creating table auth_group_permissions | |
Creating table auth_group | |
Creating table auth_user_user_permissions | |
Creating table auth_user_groups | |
Creating table auth_user | |
Creating table django_content_type | |
Creating table django_session |
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
export LANG="en_US.UTF-8" | |
export LC_COLLATE="en_US.UTF-8" | |
export LC_CTYPE="en_US.UTF-8" | |
export LC_MESSAGES="en_US.UTF-8" | |
export LC_MONETARY="en_US.UTF-8" | |
export LC_NUMERIC="en_US.UTF-8" | |
export LC_TIME="en_US.UTF-8" | |
export LC_ALL= |
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
sudo apt-get install python3 | |
sudo apt-get install git-core | |
sudo apt-get install ninja-ide | |
sudo apt-get install postgresql-9.1 | |
sudo apt-get install python-pip libpq-dev python-dev build-essential | |
sudo pip install --upgrade pip | |
sudo pip install --upgrade virtualenv | |
sudo virtualenv my_env_name --no-site-packages | |
source my_env_name/bin/activate | |
pip install django |
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
## Bootstrap for the ubuntu | |
sudo apt-get install golang fuse git-core libmtp-dev libfuse-dev | |
sudo adduser $USER fuse | |
mkdir /tmp/go | |
GOPATH=/tmp/go go get github.com/hanwen/go-mtpfs | |
sudo mv /tmp/go/bin/go-mtpfs /usr/bin/ | |
mkdir ~/AndroidPhone | |
## Mouthing |
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
@mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $color; | |
-moz-box-shadow:inset $top $left $blur $color; | |
box-shadow:inset $top $left $blur $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $color; | |
-moz-box-shadow: $top $left $blur $color; | |
box-shadow: $top $left $blur $color; | |
} |
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
#Dependencies | |
sudo add-apt-repository ppa:noobslab/themes #Theme | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 #Sublime | |
#Spotify | |
sudo apt-add-repository -y "deb http://repository.spotify.com stable non-free" | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59 | |
##Ubuntu Basic Installation |
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
from PIL import Image,ImageOps | |
import os | |
dir = os.listdir('./') | |
size = (300,300) # To the size 300 | |
for i in dir: | |
image = Image.open(i) | |
thumb = ImageOps.fit(image, size, Image.ANTIALIAS) | |
thumb.save(i) |
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
<link rel="stylesheet" href="http://goratchet.com/dist/ratchet.css" /> | |
<nav class="bar bar-tab"> | |
<a class="tab-item active" href="#"> | |
<span class="icon icon-home"></span> | |
<span class="tab-label">Home</span> | |
</a> | |
<a class="tab-item" href="#"> | |
<span class="icon icon-person"></span> | |
<span class="tab-label">Profile</span> | |
</a> |
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
// | |
// @functions | |
// | |
// RANGES | |
// We use these functions to define ranges for various things, like media queries. | |
@function lower-bound($range){ | |
@if length($range) <= 0 { | |
@return 0; |
OlderNewer