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
<!doctype html> | |
<html ng-app="Demo"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> | |
Preloading Images In AngularJS With Promises | |
</title> | |
</head> | |
<body ng-controller="AppController"> |
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
if (localStorage && !localStorage.getItem('size')) { | |
var i = 0; | |
try { | |
// Test up to 10 MB | |
for (i = 250; i <= 10000; i += 250) { | |
localStorage.setItem('test', new Array((i * 1024) + 1).join('a')); | |
} | |
} catch (e) { | |
localStorage.removeItem('test'); | |
localStorage.setItem('size', i - 250); |
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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
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 python | |
# | |
# Extracts email addresses from one or more plain text files. | |
# | |
# Notes: | |
# - Does not save to file (pipe the output to a file if you want it saved). | |
# - Does not check for duplicates (which can easily be done in the terminal). | |
# | |
# (c) 2013 Dennis Ideler <[email protected]> |
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
package main | |
import ( | |
"crypto/rand" | |
"io" | |
"bytes" | |
"bufio" | |
"fmt" | |
) |
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
package example_test | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"hex" | |
"io" | |
) | |
// AES-GCM should be used because the operation is an authenticated encryption |
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
# Esta parte hace esto | |
lookup = '__'.join(['name', 'isnull']) # name__isnull simplemente construye este string | |
# Esto ni lo explico .i. | |
def test(name__isnull, name): | |
print('arg:', str(name__isnull)) | |
print('name:', name) | |
print('lookup:', lookup) |
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
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" | |
"os" |