Skip to content

Instantly share code, notes, and snippets.

View matagus's full-sized avatar
🐿️
I miss the old Github activity stream

Matías Agustín Méndez matagus

🐿️
I miss the old Github activity stream
View GitHub Profile
@andrewchilds
andrewchilds / clubhouse.sh
Last active January 23, 2020 00:07
Clubhouse/git/deploy utility functions
# Clubhouse / git / deploy utility functions
#
# API docs: https://clubhouse.io/api
#
# Assuming the following:
# 1. We have a range of git commits that represent the changes being deployed
# 2. Our git branches and pull requests use the username/ch123/story-name format,
# so that "ch123" ends up in a commit message
# 3. We have a Clubhouse API token set to the $CLUBHOUSE_API_TOKEN environment variable
#
@kfatehi
kfatehi / _README.md
Created June 5, 2016 03:42
Rebroadcasting an icecast stream to another icecast server with inline transcoding

What?

A one-liner that pulls an AAC stream, pipes it into ffmpeg which transcodes it to mp3, then pipes it into ezstream with your settings (in the xml file) which streams it your radio.

Dependencies

sudo apt-get install ficy ffmpeg ezstream

@kn9ts
kn9ts / GPLv3.md
Last active March 8, 2024 07:26
GPLv3 explained

GPL3 LICENSE SYNOPSIS

TL;DR* Here's what the license entails:

1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
@erikbern
erikbern / use_pfx_with_requests.py
Last active May 1, 2024 11:45
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
@contextlib.contextmanager
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
@kylefox
kylefox / post_compile.sh
Last active October 23, 2020 08:42
Run Django database migrations after deploy to Heroku. This file must live at `bin/post_compile` within your root project directory.
# !/usr/bin/env bash
# File path should be ./bin/post_compile
# (.sh extension added in Gist just to enable shell syntax highlighting.
# https://discussion.heroku.com/t/django-automaticlly-run-syncdb-and-migrations-after-heroku-deploy-with-a-buildpack-or-otherwise/466/7
echo "=> Performing database migrations..."
python manage.py migrate
@githubteacher
githubteacher / show-branch.md
Created February 29, 2016 20:59
Adding your Git branch to your command prompt

To show your active Git branch in your command prompt, you will need to do the following:

  • If you are on a Mac, you can add the code shown below to your .bash_profile file.
  • If you are on Linux, you will add the code shown below to your .bashrc file.
  • If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.

The Script

parse_git_branch() {
@jpf
jpf / signed-jwt-in-python.md
Last active February 17, 2024 15:07
JWTs signed with RS256 in Python: A demonstration of org-babel

Introduction

This is a guide to using pyjwt to sign and validate a JWT using RS256.

The trickiest part of doing this is knowing what the proper OpenSSL commands are to generate the RSA keypair. I demonstrate that below.

Generating RSA keys

@Uchean
Uchean / clamav-mac.md
Created December 9, 2015 23:36
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@gokulkrishh
gokulkrishh / media-query.css
Last active May 5, 2024 08:25
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@matagus
matagus / APIs-webliography.md
Last active June 24, 2022 00:03
Links to posts, talks and slides talking about API design, arquitecture, testing, tools, etc