Skip to content

Instantly share code, notes, and snippets.

View dayvsonlima's full-sized avatar

Dayvson Lima dayvsonlima

View GitHub Profile
POST / HTTP/1.1
Host: foo.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 10
message=hi
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 17
Connection: close
Coehh rapaziada!!
def soma_dois_numeros(a, b)
return a + b
end
expect(soma_dois_numeros(1, 2)).to eq(3)
class Contact
def to_phone
...
end
end
class Contact
def id
...
end
def name
...
end
def phone
class Contact
def id
...
end
def name
...
end
def phone
AllCops:
TargetRubyVersion: 2.2
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Exclude:
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'
- 'db/**/*'
name: shards
version: 0.1.0
dependencies:
openssl:
github: datanoise/openssl.cr
branch: master
development_dependencies:
minitest:
$('.summernote').summernote({
callbacks: {
onPaste: function (e) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
e.preventDefault();
// Firefox fix
setTimeout(function () {
document.execCommand('insertText', false, bufferText);
@dayvsonlima
dayvsonlima / tutorial.md
Created June 5, 2017 01:51
generate windows .exe in python

As mentioned by other answerers, the cross-compilation feature is removed from PyInstaller since 1.5. Here, show how to package a Windows executable from Python scripts using PyInstaller under wine.

Step 1: Install wine and Python

sudo apt-get install wine wine msiexec /i python-2.7.10.msi /L*v log.txt PS: Newer Python versions already include pip (is used to install pyinstaller). Download Python installation package from here (e.g., python-2.7.10.msi)

Step 2: Install PyInstaller on wine