# list of all images on your system
$ docker images
# run a command on image busybox
$ docker run busybox echo "hello from busybox"
# shows containers that are currently running
docker ps
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
The Top 30 French Movies of all time 🇫🇷✨ | |
| |
1. LA HAINE de Matthieu Kassovitz (1995) | |
2. LE FABULEUX DESTIN D’AMÉLIE POULAIN de Jean-Pierre Jeunet (1999) | |
3. L’ARMÉE DES OMBRES de Jean-Pierre Melville (1969) | |
4. LÉON de Luc Besson (1994) | |
5. INTOUCHABLES d’Olivier Nakache et Éric Toledano (2011) | |
6. LE TROU de Jacques Becker (1960) | |
7. LES TONTONS FLINGUEURS de Georges Lautner (1963) | |
8. LA CITÉ DE LA PEUR d’Alain Berbérian (1994) |
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
SCORE = { | |
"A":1, | |
"E":1, | |
"I":1, | |
"O":1, | |
"U":1, | |
"L":1, | |
"N":1, | |
"R":1, | |
"S":1, |
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
# Script for https://app.dataannotation.tech/workers/starter_assessment_complete | |
# Instructions: https://github.com/altherlex/firekamp/blob/main/app/assets/dataannotation-assessment.png | |
# File: https://github.com/altherlex/firekamp/blob/main/app/assets/coding_qual_input.txt | |
def create_staircase(nums): | |
step = 1 | |
subsets = [] | |
while len(nums) != 0: | |
if len(nums) >= step: | |
subsets.append(nums[0:step]) |
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
seconds = Benchmark.realtime do | |
counted_links = {} | |
links.each { |e| counted_links[e] = links.count(e) if counted_links[e].nil?} | |
end | |
seconds |
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
# Create tunnel gateway | |
$ ssh -L 3306:staging-bastion:3306 tunnel@staging-bastion | |
# Check the port | |
$ nc -z localhost 3306 | |
# Dump via tunnel | |
$ mysqldump -P 3306 -ualther -p '9E@EeM#C)(Ip$n%9Cy6EIr}QyD!ZbFd' staging_myhi > staging_myhi.sql -h staging-myhi.csqfg2d4yaps.ca-central-1.rds.amazonaws.co | |
# - with gzip |
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
from datetime import date | |
nome=input('Qual é o seu nome? ') | |
print(f"Olá, {nome}! Prazer em te conhecer!") | |
dia=input('Qual é o dia do seu nascimento? ') | |
mes=input('Qual o mês? ') | |
ano=input('E o ano? ') | |
int_ano = int(ano) |
Show me your biggest code done in one line only.
lib['data'].select{|i| i['cover']['src'].nil? and images.find{|img| img[:q] == i['title']+' '+i['author']}}.each_with_index{|v, i| lib['data'].find{|l| l['book_id'] == v['book_id']}['cover'] = get_it.call(images.find{|img| img[:q] == v['title']+' '+v['author']}[:id]) }
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
# module WarningHandlers | |
# module Rails | |
# class Deprecation < StandardError; end | |
# def self.register_deprecation_handler | |
# ActiveSupport::Notifications.subscribe('deprecation.rails') do |_name, _start, _finish, _id, payload| | |
# exception = Deprecation.new(payload[:message]) | |
# Bugsnag.notify(exception) do |report| | |
# report.severity = 'warning' |
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
#!/bin/bash -eu | |
# | |
# Usage: | |
# $ cd $app_repo | |
# $ $infra_repo/myhi/deploy/ebbundle | |
# | |
# TODO: if branch == production, store an extra copy of the artifact (with the assets) in S3 | |
# TODO: lifecycle for this | |
NewerOlder