I hereby claim:
- I am acatejr on github.
- I am acatejr (https://keybase.io/acatejr) on keybase.
- I have a public key ASB_4A-FIoSiL9-X5yXwT6MZdz7zYX9p6xRUxmhhh6cixwo
To claim this, I am signing this object:
""" | |
numbers = [1,2,3,4,5,6] | |
odd_numbers = [] | |
squared_odd_numbers = [] | |
total = 0 | |
# filter for odd numbers | |
for number in numbers: | |
if number % 2 == 1: | |
odd_numbers.append(number) |
I hereby claim:
To claim this, I am signing this object:
Rename the local branch
If on local branch: git branch -m new name
If on a different branch: git branch -m old name new name
Delete the old-name remote branch and push the new-name local branch
git push origin : old name new name
Reset the upstream branch for the new-name local branch
;; This creates a samba share that can be used to map a drive on windows to | |
;; a resources in a Unix/Linux based virtual machine. | |
[ubuntu] | |
path = /home/ubuntu | |
writeable = yes | |
read only = no | |
browseable = yes | |
guest ok = yes | |
create mask = 0755 | |
directory mask = 0755 |
docker create -v /var/lib/postgresql/data --name postgres9.5-data busybox
docker run --name local-postgres9.5 -p 5432:5432 -e POSTGRES_PASSWORD=sql -d --volumes-from postgres9.5-data postgres:9.5
RUN apt update -y --fix-missing
# An example of a url with three parameters separated by forward slash. | |
url(r'^addresspermits/(?P<param1>.+)/(?P<param2>.+)/(?P<param3>.+)/$','views.method_name', name='method_name'), | |
# Single value parameter that allows a combination of upper and lower case characters. | |
url(r'^detail/(?P<param>[\w|\W]+)$', 'views.detail', name='detail'), |
// How to group data | |
var map = d3.nest() | |
.key(function(d) { return d.attribute; }) | |
.rollup(function(v) { | |
return { | |
count: v.length | |
}; | |
}) | |
.map(data); |
To hide file in the explorer pane File -> Preferences -> User Settings This opens the settings.json file Create like the following entry:
"files.exclude": { "**/*.pyc": true, }
This would prevent all .pyc files from being listed in the Explorer pane tree-veiw.
# The django development server (1.9) does not seem to render svg files. In order to render them these lines | |
# can be added to the project's settings.py file. This may require restarting the django server and clearing the browser cache. | |
import mimetypes | |
mimetypes.add_type("image/svg+xml", ".svg", True) | |
mimetypes.add_type("image/svg+xml", ".svgz", True) |
// Change the Angular brackets to [[ and ]] | |
$interpolateProvider.startSymbol('[[').endSymbol(']]'); | |
// Tells the app to use csrf token in views | |
$httpProvider.defaults.xsrfCookieName = 'csrftoken'; | |
$httpProvider.defaults.xsrfHeaderName = ' X-CSRFToken'; | |
// Stop Angular strip trailing slashes. Angular loves to strip trailing slashes. | |
// Newer in Angular 3 | |
$resourceProvider.defaults.stripTrailingSlashes = false; |