Skip to content

Instantly share code, notes, and snippets.

View Rafael-Ramblas's full-sized avatar

Rafael Ramblas Rafael-Ramblas

  • omnivector-solutions
View GitHub Profile
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 23, 2025 17:13
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@marciopalheta
marciopalheta / verificacaodeassintatura.txt
Created December 2, 2013 03:51
Resolvendo o erro de verificação da assinatura no Ubuntu / Mint
Se, ao tentar atualizar a lista de pacotes no Ubuntu,
você se deparar com as seguintes mensagens de erro (ou similares):
W: Um erro ocorreu durante a verificação da assinatura. O repositório não foi atualizado e o índice anterior de arquivo será usado. Erro GPG: http://extras.ubuntu.com oneiric Release:As seguintes assinaturas eram inválidas: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <[email protected]>
W: Erro GPG: http://archive.canonical.com oneiric Release: As seguintes assinaturas eram inválidas: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>
W: Erro GPG: http://ppa.launchpad.net oneiric Release: As seguintes assinaturas eram inválidas: BADSIG 9B0BBF00E2D0EBE9 Launchpad PPA for RAVEfinity Project
Aqui, funcionou com a seguinte sequência de comandos no terminal:
@fupslot
fupslot / gist:5015897
Created February 22, 2013 19:23
Javascript: Convert base64 to a Blob
function dataURItoBlob(dataURI, callback) {
// convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
var byteString = atob(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]
// write the bytes of the string to an ArrayBuffer
var ab = new ArrayBuffer(byteString.length);
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",