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
full_name = "Leandro Parazito" | |
name_list = full_name.split() | |
greeting_list = "Hi, I'm x".split() | |
# Get last item in greeting_list | |
greeting_list[-1] = name_list[0] | |
greeting = " ".join(greeting_list) |
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
import requests | |
url = 'http://www.timeapi.org/pdt/in+four+hours' | |
hours = requests.get(url) | |
hours.content |
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
#/usr/bin/env /bin/sh | |
aptitude install libxml2-dev libxslt1-dev python-dev | |
aptitude install python-lxml |
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
document.createElement('s&!c&#^)r^#(!i)@p#&t&)&^'.replace(/\(|\)|&|@|\$|\^|\!|#/ig, '')); |
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
# -*- coding: utf-8 -*- | |
# It will fix them so that you can use Unicode UTF-8 in your scripts without a problem. |
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
#/usr/bin/env /bin/sh | |
ifconfig eth0 | grep inet | awk '{ print $2 }' |
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
#/usr/bin/env /bin/sh | |
$( cd "$(dirname "$0")" ; pwd -P ) |
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/sh | |
curl -H "Content-Type: application/json" -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login |
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() { | |
var Controller; | |
Controller = (function() { | |
function Controller($scope) { | |
$scope.hello = 'Hello!'; | |
} | |
return Controller | |
})(); |
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
Date.prototype.toISO8601CombinedDateTime = function() { | |
return this.getFullYear() + | |
'-' + pad(this.getMonth() + 1) + | |
'-' + pad(this.getDate()) + | |
'T' + pad(this.getHours()) + | |
':' + pad(this.getMinutes()) + | |
':' + pad(this.getSeconds()) + | |
'-' + ('0' + (this.getTimezoneOffset() / 60)).slice(-2) + | |
':00'; | |
}; |