Skip to content

Instantly share code, notes, and snippets.

View nogara's full-sized avatar

Luiz Gustavo Nogara nogara

  • Square Knowledge Ventures
  • Rio de Janeiro
View GitHub Profile
@acidtib
acidtib / readme.md
Created August 28, 2023 17:56
kamal + github actions

Example of Kamal deployment from Github Actions.

Add your applications .env variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions

https://github.com/username/repo_name/settings/secrets/actions

you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret

create action workflows

@dannberg
dannberg / obsidian-daily-note-template.txt
Last active May 2, 2024 19:35
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@h6y3
h6y3 / md_slack.rb
Last active May 26, 2023 08:55
Obsidian Markdown to Slack
#!/usr/bin/env ruby
filename = "/Users/hyuan/Development/bin/tmp/tmp_slack_md.txt"
file = File.open(filename)
file_data = file.read
# Upper case title
re = /^#* .+/
file_data.gsub!(re) { |match| "*#{match.upcase}*"}
@KROSF
KROSF / ubuntu.md
Last active March 16, 2024 12:19
Configuring ZSH

Configure ZSH using zplug and starship

Steps

Install zplug

curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active April 16, 2024 10:42
Byte formatting for Google Sheets
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@Red5d
Red5d / home-assistant_nodered_mqtt.yml
Created November 23, 2017 17:18
docker-compose file for setting up homeassistant, node-red, and mqtt services
version: "3"
services:
homeassistant:
image: homeassistant/home-assistant
ports:
- "8123:8123"
- "3218:3218"
volumes:
- /opt/docker/home-assistant:/config
- /etc/localtime:/etc/localtime:ro
bindkey "[D" backward-word
bindkey "[C" forward-word
export PATH=/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/hugosequeira/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
@cannikin
cannikin / deploy.rb
Last active October 22, 2018 09:02
Notify Sentry of a new release via Capistrano
# This task will notify Sentry via their API[1] that you have deployed
# a new release. It uses the release timestamp as the `version`
# (like 20151113182847) and the git ref as the optional `ref` value.
#
# This task requires several environment variables be set (or just
# hardcode the values in here if you like living on the edge):
#
# ENV['SENTRY_API_ENDPOINT'] : API endpoint, https://app.getsentry.com
# ENV['SENTRY_ORG'] : the organization for this app
# ENV['SENTRY_PROJECT'] : the project for this app
@skwasha
skwasha / .dockercfg.template
Last active August 7, 2018 13:40
Deploying Meteor to AWS Elastic Beanstalk as a Docker image from Github via CircleCI
{
"https://index.docker.io/v1/": {
"auth": "<base64 encoded Docker username:password>",
"email": "<Docker Account Email>"
}
}