Skip to content

Instantly share code, notes, and snippets.

View josefmonje's full-sized avatar

@josefmonje josefmonje

View GitHub Profile
aws ce get-cost-and-usage --time-period Start=$(date -v-1m -v1d -u +%Y-%m-%d),End=$(date -v1d -u +%Y-%m-%d) --granularity MONTHLY --metrics "BlendedCost" --output text
transfer +639175253816 --caller=+639175253816
say en "Hello! Mic test 1 2 3"
# SDR
function fm() {
rtl_fm -M wbfm -f $1M | play -r 32k -t raw -e s -b 16 -c 1 -V1 -
}
# Youtube downloader
function ytdl() {
youtube-dl -x --prefer-ffmpeg --audio-format mp3 $1
}
auto lo
iface lo inet loopback
allow-hotplug usb0
iface usb0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
@josefmonje
josefmonje / config.txt
Last active March 28, 2018 15:30
for vuefine
disable_overscan=1
hdmi_group=1
hdmi_mode=4
# retropie
hdmi_force_hotplug=1
hdmi_drive=2
config_hdmi_boost=4
from django.template import Library, Node, TemplateSyntaxError, Variable
from django.conf import settings
from django.core import urlresolvers
register = Library()
class ViewNode(Node):
def __init__(self, url_or_view, *args, **kwargs):
import os
import urllib
from django.contrib.auth import user_logged_in
from django.contrib.auth.models import User
from django.http import Http404
from django.shortcuts import redirect
from django.urls import reverse
from django.views import generic
from httplib2 import Http
@josefmonje
josefmonje / Dockerfile
Last active September 4, 2017 16:43 — forked from alexellis/Dockerfile
Flask on FaaS - minimal example with CGI Handler
FROM python:2.7-alpine
ADD https://github.com/alexellis/faas/releases/download/0.5.6-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
RUN pip install flask
ENV fprocess="python handler.py"
#!/bin/bash
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
sudo docker swarm init
git clone https://github.com/alexellis/faas.git
cd faas
sudo ./deploy_stack.armhf.sh
sudo watch 'docker service ls'