Skip to content

Instantly share code, notes, and snippets.

View DouglasPioStudiare's full-sized avatar

douglascpioc DouglasPioStudiare

View GitHub Profile
@biklas7
biklas7 / README.md
Last active March 21, 2024 20:28
A Gradle task that generates and publish an Android .apk file to an S3 bucket.

Publish Android .apk file to an S3 bucket

Setup your S3 variables

You can either set up the S3 variables for all projects or per individual project if you prefer. In this example, I will do it for all projects. Just open the build.gradle file and add the following code.

allprojects {
    project.ext.AWS_S3_BUCKET = "YOUR BUCKET NAME"
@Ryanb58
Ryanb58 / install.md
Last active May 3, 2024 17:34
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> 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]
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 5, 2024 16:40
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nikhita
nikhita / update-golang.md
Last active April 27, 2024 13:09
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@jgoizueta
jgoizueta / application_helper.rb
Created February 24, 2017 19:42
Rails helpers to define tables column-wise
# encoding: UTF-8
module ApplicationHelper
# ...
def concat_content_tag(*args, &blk)
concat content_tag(*args, &blk)
end
end
@mihow
mihow / load_dotenv.sh
Last active May 4, 2024 12:32
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@jdforsythe
jdforsythe / git-rename-stash.sh
Created October 28, 2016 13:45
Rename Git Stash
#!/bin/bash
git stash list
echo "Enter stash number to rename"
read stash_number
echo "Enter new name"
read new_name
stash_name="stash@{${stash_number}}"
echo "$stash_name"
@mcshakes
mcshakes / Rails C error.
Created October 14, 2016 23:45
Running into RVM and readline issues
$ rails c
Running via Spring preloader in process 7916
/Users/edmac/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require': dlopen(/Users/edmac/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin14/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
Referenced from: /Users/edmac/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin14/readline.bundle
Reason: image not found - /Users/edmac/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin14/readline.bundle
Fixed with:
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@onjin
onjin / docker-compose.yml
Created September 5, 2016 09:17
example docker compose for postgresql with db init script
postgres:
image: postgres:9.4
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
@romuald
romuald / processlist.sql
Last active April 16, 2024 20:15
Show PostgreSQL current (running) process list;
SELECT user, pid, client_addr, waiting, query, query_start, NOW() - query_start AS elapsed
FROM pg_stat_activity
WHERE query != '<IDLE>'
-- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1
ORDER BY elapsed DESC;