Skip to content

Instantly share code, notes, and snippets.

View Jakobuz's full-sized avatar
🏠
Working from home

Jakob Jakobuz

🏠
Working from home
View GitHub Profile
@Jakobuz
Jakobuz / convert_gpx.sh
Created November 17, 2022 17:21 — forked from StevenMaude/convert_gpx.sh
Use gpsbabel to convert Garmin .FIT to .gpx — requires a fairly recent version of gpsbabel (minimum 1.4.3); see https://www.stevenmaude.co.uk/posts/using-garmin-forerunner-watches-with-linux for more details on using Garmin watches with Linux
#!/bin/sh
# Usage: convert_gpx.sh <FIT filename>
# Should works whether you include the .FIT extension or not.
filename=$(basename "$1" .FIT)
gpsbabel -i garmin_fit -f "$filename".FIT -o gpx -F "$filename".gpx
@Jakobuz
Jakobuz / HOWTO
Created January 30, 2022 22:36 — forked from axcxl/HOWTO
Very lightweight Linux on old Asus Transformer T100TAF
System description:
- 1GB RAM
- Intel Atom Z3735G
- 32GB MMC
- card reader
- docking keyboard with USB 3.0 port
# Puppy Linux
RESULT: no wireless out of the box with BionicPup64 8.0, device does not show up in lspci either (hw kill switch?)
@Jakobuz
Jakobuz / etc.css
Created December 7, 2021 17:01 — forked from hensm/etc.css
Thunderbird CSS styling
#threadTree {
background: #fff !important;
color: #3c3c3e !important;
}
#folderTree {
background: #fafafb !important;
color: #636365 !important;
}
#folderTree > treechildren::-moz-tree-cell(primary) {
@Jakobuz
Jakobuz / ICS.php
Created December 6, 2021 19:51 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@Jakobuz
Jakobuz / netrw.txt
Created March 15, 2021 07:58 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@Jakobuz
Jakobuz / vimrc
Created March 18, 2019 20:56
My Vim rc file.
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
syntax on
filetype on
filetype plugin on
filetype indent on
behave mswin
runtime macros/matchit.vim
@Jakobuz
Jakobuz / gist:baad801c737812c2eea5bba10bdd6247
Created March 27, 2018 01:37 — forked from nodesocket/gist:3919205
All world timezones in an HTML select element
<select name="timezone_offset" id="timezone-offset" class="span5">
<option value="-12:00">(GMT -12:00) Eniwetok, Kwajalein</option>
<option value="-11:00">(GMT -11:00) Midway Island, Samoa</option>
<option value="-10:00">(GMT -10:00) Hawaii</option>
<option value="-09:50">(GMT -9:30) Taiohae</option>
<option value="-09:00">(GMT -9:00) Alaska</option>
<option value="-08:00">(GMT -8:00) Pacific Time (US &amp; Canada)</option>
<option value="-07:00">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
<option value="-06:00">(GMT -6:00) Central Time (US &amp; Canada), Mexico City</option>
<option value="-05:00">(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima</option>
@Jakobuz
Jakobuz / custom_query.php
Created March 10, 2018 12:42 — forked from danott/custom_query.php
Wordpress custom query for getting information outside of The Loop
<?
// This is a sub query for pulling data from outside of the loop..
// However, we need to preserve the original $wp_query if this is inside an existing loop.
// If this is the last query, then you can ditch it.
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query('your-custom-query');
@Jakobuz
Jakobuz / gist:0d009e0cf8c81717ee47a76f1ce889a8
Created January 28, 2018 16:51 — forked from y-gagar1n/gist:8469484
DateTime format patterns
DateTime.ToString() Patterns
All the patterns:
0 MM/dd/yyyy 08/22/2006
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM
<?php
if(isset($_POST['submit'])):
if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])):
//your site secret key
$secret = 'InsertSiteSecretKey';
//get verify response data
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']);
$responseData = json_decode($verifyResponse);
$name = !empty($_POST['name'])?$_POST['name']:'';