Skip to content

Instantly share code, notes, and snippets.

@marcqualie
marcqualie / yardoc_cheatsheet.md
Created March 15, 2021 16:20 — forked from phansch/yardoc_cheatsheet.md
Improved YARD cheatsheet
- image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
+ image: elasticsearch:7.8.1

Keybase proof

I hereby claim:

  • I am marcqualie on github.
  • I am marcqualie (https://keybase.io/marcqualie) on keybase.
  • I have a public key ASB21h-9U25mpJZDmC9LOFnKFHL9tfelF4u5y2gegRkkCwo

To claim this, I am signing this object:

@marcqualie
marcqualie / gist:e32e850121365587920b292aa5afb08e
Created April 12, 2019 14:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
t = 236 # seconds
Time.at(t).utc.strftime("%H:%M:%S")
=> "00:03:56"
# Reference
# http://stackoverflow.com/questions/3963930/ruby-rails-how-to-convert-seconds-to-time
@marcqualie
marcqualie / bash-colors.md
Created August 8, 2018 14:02 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@marcqualie
marcqualie / docker-cleanup-resources.md
Created January 21, 2018 04:47 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@marcqualie
marcqualie / backup-mysql
Last active April 20, 2016 14:25
Simple scripts to backup MySQL and Web Content
#!/usr/bin/env python
import os
import time
# Variables
username = 'backup'
password = 'password'
hostname = 'localhost'
filestamp = time.strftime('%Y%m%d')