Skip to content

Instantly share code, notes, and snippets.

View joshbmarshall's full-sized avatar

Josh Marshall joshbmarshall

View GitHub Profile
@joshbmarshall
joshbmarshall / gist:6517321
Last active December 22, 2015 19:08 — forked from Shagshag/gist:5849065
Original gist would not work if a string had a character like : in it. Modified so that it would assign as a number if numeric otherwise assign as a string (escaping double quotes)
<?php
/**
* do the same than parse_str without max_input_vars limitation
* @param $string array string to parse
* @return array query parsed
**/
function my_parse_str($string) {
$result = array();
// find the pairs "name=value"

Keybase proof

I hereby claim:

  • I am joshbmarshall on github.
  • I am joshmarshall (https://keybase.io/joshmarshall) on keybase.
  • I have a public key ASDMEVzOyTNqViR4nAGHpMnHIux6F-f7YtsOIFht8vS9yAo

To claim this, I am signing this object:

@joshbmarshall
joshbmarshall / akbl.sh
Created April 11, 2023 13:30
Automatic keyboard backlight on/off on Thinkpad bash script
#!/bin/bash
startup_time="20:00"
end_time="08:00"
inactivity_time=10000
polling_interval=0.5
device=tpacpi::kbd_backlight
on_value=1
off_value=0