>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This is unmaintained and was created for personal use. As I passed the exam I have no use to keep this up to date. Feel free to fork
What are the consequences for a person driving a motor vehicle under the influence of drugs (e.g. hashish, heroin, cocaine)?
[x] Confiscation of driving licence or driving ban
[x] Compulsory medical/psychological examination
[x] Fine and/or imprisonment
In which instances do you have to approach a pedestrian crossing with particular care?
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
class Integer | |
N_BYTES = [42].pack('i').size | |
N_BITS = N_BYTES * 16 | |
MAX = 2 ** (N_BITS - 2) - 1 | |
MIN = -MAX - 1 | |
end | |
p Integer::MAX #=> 4611686018427387903 | |
p Integer::MAX.class #=> Fixnum | |
p (Integer::MAX + 1).class #=> Bignum |
For a project I am on I need to use a key-value store to converts file-paths to fixnum IDs. The dataset will typically be in the range of 100 000 to 1 000 000. These tests use 305 000 file paths to fixnum IDs.
The Different Key-Value stores tested are:
Daybreak: "Daybreak is a simple and very fast key value store for ruby" GDBM: GNU dbm. "a simple database engine for storing key-value pairs on disk." DBM: "The DBM class provides a wrapper to a Unix-style dbm or Database Manager library" PStore: "PStore implements a file based persistence mechanism based on a Hash. "
Out of these, all except Daybreak are in the Ruby standard library.
import soap from 'soap'; | |
import moment from 'moment'; | |
const taxServiceUrl = 'http://hehexd.com/services/1.2/taxservice.asmx?WSDL' | |
export function generateJsonForTaxRate(json) { | |
const EffectiveDate = moment().toISOString(); | |
const { | |
city: City, | |
state: State, | |
addressLineOne: Street1, |
local function string(o) | |
return '"' .. tostring(o) .. '"' | |
end | |
local function recurse(o, indent) | |
if indent == nil then indent = '' end | |
local indent2 = indent .. ' ' | |
if type(o) == 'table' then | |
local s = indent .. '{' .. '\n' | |
local first = true |
import React, { Component } from 'react'; | |
import { Field, reduxForm } from 'redux-form'; | |
import { connect } from 'react-redux'; | |
import * as actions from '../../actions'; | |
const form = reduxForm({ | |
form: 'ReduxFormTutorial', | |
validate | |
}); |
# config/initializers/mime_types.rb | |
Mime::Type.register "application/vnd.ms-excel", :xls |