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
Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted; | |
Use git checkout $commit~1 filename to restore the deleted file. |
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
psql -d template1 -c 'create extension hstore;' |
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
coverage run --source='app_name' manage.py test app_name | |
coverage report -m |
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
git config core.fileMode false |
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
youtube-dl --list-formats URL | |
youtube-dl --format URL |
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
<ul> | |
<li ng-repeat="(key, errors) in form.$error track by $index"> <strong>{{ key }}</strong> errors | |
<ul> | |
<li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li> | |
</ul> | |
</li> | |
</ul> |
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 save_image(file_name, new_file_name, directory): | |
""" | |
:param file_name(string) old name of image | |
:param new_file_name(string) new name of image | |
:param directory(string) name of directory from which image has been fetched | |
helps to create images | |
""" | |
tags_list = ['vd-images'] | |
applicable_languages_list = ['en'] | |
# over here import the django model specific to images |
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
shopt -s extglob | |
rm !(X|Y) |
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
$(document).ready(function() { | |
function jQuerySubmit(type, url, data, contentType, dataType, handler) { | |
$.ajax({ | |
type: type, | |
url: url, | |
data: data, | |
contentType: contentType | |
dataType: dataType, | |
success: handler | |
}); |
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
function parseDuration(PT) { | |
var output = []; | |
var durationInSec = 0; | |
var matches = PT.match(/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)W)?(?:(\d*)D)?T(?:(\d*)H)?(?:(\d*)M)?(?:(\d*)S)?/i); | |
var parts = [ | |
{ // years | |
pos: 1, | |
multiplier: 86400 * 365 | |
}, | |
{ // months |
OlderNewer