This is a minimal config for React.js that allows code spliting, hot reloading dev server and build capabilities.
src/index.html
src/main.js
.babelrc
package.json
const SQUARE_WIDTH = 9; | |
const HEIGHT = 9; | |
const SPACING = 5; | |
const DRAW_CHAR = "*"; | |
function drawSquare(line) { | |
let square = ""; | |
for (let row = 0; row < SQUARE_WIDTH; row++) { | |
if (line === 0 || line === HEIGHT - 1) { | |
square += DRAW_CHAR; |
{ | |
"Generic editorconfig": { | |
"scope": "editorconfig", | |
"prefix": "cfg", | |
"body": [ | |
"root = true", | |
"", | |
"[*]", | |
"indent_style = space", | |
"indent_size = 2", |
#!/usr/bin/env bash | |
# ----------------------------- VARIÁVEIS ----------------------------- # | |
URL_GOOGLE_CHROME="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" | |
URL_SIMPLE_NOTE="https://github.com/Automattic/simplenote-electron/releases/download/v1.8.0/Simplenote-linux-1.8.0-amd64.deb" | |
URL_VSCODE="https://go.microsoft.com/fwlink/?LinkID=760868" | |
URL_SLACK="https://downloads.slack-edge.com/linux_releases/slack-desktop-4.1.2-amd64.deb" | |
URL_FIRECODE_FONT="https://github-production-release-asset-2e65be.s3.amazonaws.com/26500787/4cb9e980-d344-11e9-91cc-18f9a761c960?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191022%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191022T165626Z&X-Amz-Expires=300&X-Amz-Signature=0ad748fe86e03afedf84b1738e984d71929e59d711dddec24efdc7aeac1183fb&X-Amz-SignedHeaders=host&actor_id=1143232&response-content-disposition=attachment%3B%20filename%3DFiraCode_2.zip&response-content-type=application%2Foctet-stream" | |
URL_VSCODE_SETTINGS="https: |
{ | |
"editor.fontFamily":"Fira Code", | |
"editor.fontLigatures": false, | |
"editor.fontSize":16, | |
"editor.lineHeight":24, | |
"editor.parameterHints.enabled": false, | |
"editor.renderLineHighlight": "gutter", | |
"editor.renderWhitespace": "boundary", | |
"editor.rulers": [120], | |
"editor.tabCompletion": "off", |
## Just run the following line | |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
import os | |
import urllib | |
import json | |
from urllib.parse import urlparse | |
from urllib import request | |
""" | |
This script downloads bing's image of the day on the specified folder and set it as wallpaper in xfce4 | |
""" |
fileIO = BytesIO() | |
boletoPDF = pdf.BoletoPDF(fileIO) | |
boletoPDF.drawBoleto(boleto_dados) | |
boletoPDF.save() | |
fileIO.seek(0) | |
response = HttpResponse(fileIO.read(), content_type='application/pdf') | |
response['Content-Dispositon'] = 'attachment; filename=boleto.pdf' |
{% load add_class %} | |
<form method="post"> | |
{% csrf_token %} | |
{{ form.non_field_errors }} | |
{% for field in form %} | |
<div class="form-group"> | |
{{field.label_tag}} | |
{{field | add_class:"form-control"}} | |
{{field.errors}} | |
</div> |