This gist is about:
- https://twitter.com/taylorotwell/status/600680897550098432
- https://twitter.com/Ocramius/status/600705252539691008
Mainly:
function
cannot (should not) be used when side-effects occur
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
#!/bin/bash | |
#Download the latest copy of WordPress into a directory, grab all the files in the new /wordpress folder | |
#Put all the files in the current directory, remove the now empty /wordpress directory | |
#Remove the tarball | |
#download latest wordpress with wget | |
wget http://wordpress.org/latest.tar.gz | |
#OR using CURL |
This gist is about:
Mainly:
function
cannot (should not) be used when side-effects occur1 - install GPG tools : https://gpgtools.org/
2 - Create new key for your github email
3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY
4 - configure git to sign all commits: git config --global commit.gpgsign true
5 - add to the bottom of ~/.gnupg/gpg.conf
: (create the file if it not exists)
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
[ | |
{ | |
"value": "001", | |
"label": "Banco do Brasil S.A." | |
}, | |
{ | |
"value": "003", | |
"label": "Banco da Amazônia S.A." | |
}, | |
{ |
Javascript:
export const getFile = (coArquivo, config = { responseType: 'blob' }) => instance.get(`/upload/${coArquivo}`, config)
.then((response) => {
const { headers } = response;
const dadosFilename = headers['content-disposition'].split('filename=');
const filename = dadosFilename[1];
const url = window.URL.createObjectURL(new Blob([response.data]));
import 'package:bip39/bip39.dart' as bip39; | |
import "package:hex/hex.dart"; | |
import 'package:web3dart/credentials.dart'; | |
import 'package:bip32/bip32.dart' as bip32; | |
abstract class OKAddressETH { | |
String generateMnemonic(); | |
String getPrivateKey(String mnemonic); | |
Future<EthereumAddress> getPublicAddress(String privateKey); | |
} |