Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kasparsd's full-sized avatar

Kaspars Dambis kasparsd

View GitHub Profile
@festlv
festlv / main.py
Last active January 7, 2022 22:27
air-guard main.py exploratory prototype
from sargs import *
# Pārbaude pēc ieslēgšanās: ieslēdzam visas gaismas diodes pēc kārtas
pins = [LED_ZALS, LED_DZELTENS, LED_SARKANS, LED_KREISA_ACS, LED_LABA_ACS]
for p in pins:
p.ieslegt()
pagaidit(0.5)
# Nedaudz uzgaidot, izslēdzam visas gaismas diodes apgrieztā kārtībā
pagaidit(1)
@lukecav
lukecav / Links
Last active October 7, 2019 09:39
DevKit CLI Beta
@h4
h4 / LYWSD02.txt
Created May 20, 2019 06:48
LYWSD02 sensor available characteristics
Service: 00001800-0000-1000-8000-00805f9b34fb
Characteristic: 00002a00-0000-1000-8000-00805f9b34fb
READ
b'LYWSD02'
Characteristic: 00002a01-0000-1000-8000-00805f9b34fb
READ
b'\x00\x00'
Service: 00001801-0000-1000-8000-00805f9b34fb
Characteristic: 00002a05-0000-1000-8000-00805f9b34fb
READ INDICATE
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@ziogaschr
ziogaschr / debian-wvdial-ppp0-interface-autossh.markdown
Last active July 31, 2023 13:50
Reverse proxy over 3G modem (draft)

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@westonruter
westonruter / .gitmodules
Last active November 26, 2018 21:17
Test widget plugin for WordPress issue #27491: Widget Customizer: Dynamically-created inputs cause from to replace itself without event to trigger re-initialization https://core.trac.wordpress.org/ticket/27491
[submodule "chosen"]
path = chosen
url = git@github.com:harvesthq/chosen.git

How to Version a Stylesheet in WordPress

wp_enqueue_style() is your friend

In your theme, you should be using the wp_enqueue_style() function instead of calling your stylesheet directly in your header.php file. Use something like this in your theme's functions.php file:

<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_stylesheet' );
@hissy
hissy / nav-menu-exporter-importer.php
Last active August 13, 2023 17:06
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/