Skip to content

Instantly share code, notes, and snippets.

View estevaoam's full-sized avatar
🤖

Estevão Mascarenhas estevaoam

🤖
View GitHub Profile
@onlurking
onlurking / programming-as-theory-building.md
Last active April 19, 2024 22:31
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@koshatul
koshatul / README.md
Last active April 18, 2024 23:33
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@ryderdamen
ryderdamen / gce-to-gcs-uploads.md
Created December 4, 2018 15:43
Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.

Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine. You can use the gsutil command line tool that comes installed on all GCE instances.

If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.

@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@rafaelrinaldi
rafaelrinaldi / README.md
Last active July 28, 2016 18:53
Simple script to display usage information about your project

Simple script to display usage information about your project

Usage

Implement a help field on your project's package.json listing all the scripts you want to display information about. Just make sure to use the same keys.

$ npm run help -s

> project-sample@1.0.0 help /Users/gordon-freeman/dev/project-sample
@Chandler
Chandler / slack_history.py
Last active March 26, 2024 14:35
Download Slack Channel/PrivateChannel/DirectMessage History
print("UPDATE AUG 2023: this script is beyond old and broken")
print("You may find interesting and more up to date resources in the comments of the gist")
exit()
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
@pond
pond / gist:5eaec0c30c0b4477f234
Last active August 29, 2015 14:05
PostgreSQL "active?" Rails adapter check async patch
# This monkey patches the PostgreSQL adapter to use asynchronous
# communication when doing its "SELECT 1" check for is-connection-active.
# One symptom of this problem is stalled processing queues in Sidekiq.
# See also:
#
# https://github.com/rails/rails/issues/12867
#
# At the time of writing we have seen indefinite blocking down in the C
# library's "poll()" method due to the out-of-box Rails code using blocking
# I/O, in multithreaded environments - one thread gets stuck in the I/O and
@paulodeleo
paulodeleo / Minhas anotações sobre a palestra "Workflow remoto, passo a passo da equipe de alta performance" com Fábio Akita
Created August 20, 2014 02:34
Minhas anotações sobre a palestra "Workflow remoto, passo a passo da equipe de alta performance" com Fábio Akita
http://www.conadev.com/fa190814.php
Assitido em 19/08/2014
Destaques sobre o relato de como as coisas funcionam na Codeminer:
- O principal mérito dado ao uso de escritório físico é juntar juniors e seniors em um mesmo ambiente;
- Usam slack para comunicação unificada;
- Escritórios e equipes não tem gerentes;
@staltz
staltz / introrx.md
Last active April 24, 2024 18:10
The introduction to Reactive Programming you've been missing
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote