Skip to content

Instantly share code, notes, and snippets.

View Lauszus's full-sized avatar

Kristian Sloth Lauszus Lauszus

View GitHub Profile
@mushfiq
mushfiq / README.md
Last active October 28, 2020 14:48

Backend web push service

To run the API, following settings need to be exported as env variables

  • VAPID email
  • VAPID private key path
  • VAPID public key path

Running the API

@robsonvn
robsonvn / html_for_international_calling coes.htm
Last active March 29, 2023 20:27 — forked from andyj/html_for_international_calling coes.htm
HTML <select> international calling codes for each country
<!-- using semantic ui to display flags -->
<div class="field">
<label>Country</label>
<div class="ui fluid search selection dropdown">
<input type="hidden" name="country" value="">
<i class="dropdown icon"></i>
<div class="default text">Select Country</div>
<div class="menu">
<div class="item" data-value="64"><i class="nz flag"></i>New Zealand (+64)</div>
<div class="item" data-value="61"><i class="au flag"></i>Australia (+61)</div>
@Lauszus
Lauszus / ZomBuster.sh
Last active June 3, 2018 14:09
Install OpenCV on minimal Raspbian image for use with: https://github.com/Lauszus/ImageAnalysisWithMicrocomputer30330
#!/bin/bash -e
gpio mode 8 up # Input with internal pull-up resistor
#echo "Compiling..."
#make -C ~/ImageAnalysisWithMicrocomputer30330/ZomBuster/src 1> /dev/null
echo "Press button to start"
while true; do
while [ $(gpio read 8) == 1 ]; do
@maxim
maxim / gh-dl-release
Last active March 29, 2024 16:41
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@srv89
srv89 / python_email.py
Last active January 29, 2024 00:24
Python code for sending HTML email (Attachment + Multiple Recipients )
__author__ = 'srv'
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
username = '' # Email Address from the email you want to send an email
password = '' # Password
server = smtplib.SMTP('')
@arusahni
arusahni / nocache.py
Last active December 28, 2022 13:12
Flask nocache decorator
from flask import make_response
from functools import wraps, update_wrapper
from datetime import datetime
def nocache(view):
@wraps(view)
def no_cache(*args, **kwargs):
response = make_response(view(*args, **kwargs))
response.headers['Last-Modified'] = datetime.now()
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0'
@jpeddicord
jpeddicord / build.gradle
Last active April 14, 2023 20:31
Release APK builder that asks for your key passwords interactively, so you don't have to store them in your build script or VCS. For use with the Gradle build system. CC0 license.
// additional required configuration to hook into the build script
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
@mattwilliamson
mattwilliamson / avrdude.conf
Created June 1, 2012 15:51
ATmega1284 AVRDude support
#------------------------------------------------------------
# ATmega1284
#------------------------------------------------------------
# similar to ATmega164p
part
id = "m1284";
desc = "ATMEGA1284";
has_jtag = yes;
@kreeger
kreeger / mw2md.rb
Created March 5, 2012 22:43
Ruby: Convert MediaWiki to Markdown
#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
require 'maruku'
require 'wikicloth'
require 'tidy_ffi'
require 'pandoc-ruby'
opts = {}
OptionParser.new do |o|
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}