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
.item-blur { | |
/* blur */ | |
filter: blur(5px); | |
-webkit-filter: blur(5px); | |
-moz-filter: blur(5px); | |
-o-filter: blur(5px); | |
-ms-filter: blur(5px); | |
filter: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQoJPGZpbHRlciBpZD0iYmx1ciI+DQoJCTxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjMiIC8+DQoJPC9maWx0ZXI+DQo8L3N2Zz4=#blur); | |
-webkit-transition: -webkit-filter .50s; | |
/* prevent copy */ |
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
# generate a new key | |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/my_key | |
# private key | |
cat ~/.ssh/my_key | |
# public key | |
cat ~/.ssh/my_key.pub | |
# add key | |
ssh-add ~/.ssh/my_key |
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
import datetime | |
import calendar | |
def get_days_passed(before, after): | |
d1 = before.date() | |
d2 = after.date() | |
return abs(d1 - d2).days | |
d1 = datetime.datetime(2014, 05, 24, 17, 0, 0) | |
d2 = datetime.datetime(2014, 05, 24, 18, 5, 0) |
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
def swap(a, i, j): | |
t = a[i] | |
a[i] = a[j] | |
a[j] = t | |
def permutations(a, i, n): | |
if i == n: | |
print a | |
else: | |
for j in range(i, n): |
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
$('body').on('click', '.autocomplete-light-widget .deck .remove', function() { | |
// do something | |
}); |
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
def get_queryset(self): | |
queryset = super(MyModel, self).get_queryset() | |
states_filter = [ | |
item.strip() | |
for item in config.STATES.split(',') | |
] | |
if not states_filter: | |
MyModel.objects.none() | |
q = Q() | |
for state in states_filter: |
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
class Post(models.Model): | |
image = models.ImageField( | |
max_length=255, | |
upload_to='uploads/blog', | |
) |
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
export CFLAGS=-Qunused-arguments | |
export CPPFLAGS=-Qunused-arguments | |
pip install lxml |
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
find . -name "*.pyc" -exec rm '{}' ';' |
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
[user] | |
name = Vera | |
email = [email protected] | |
[color] | |
ui = true | |
[alias] | |
st = status | |
ci = commit | |
last = log -1 HEAD | |
co = checkout |