Skip to content

Instantly share code, notes, and snippets.

View paranoiq's full-sized avatar
🍵
418 I am a teepot

Vlasta Neubauer paranoiq

🍵
418 I am a teepot
View GitHub Profile
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 12, 2024 03:32
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@yi
yi / gist:01e3ab762838d567e65d
Created July 24, 2014 18:52
lua hex <= => string
function string.fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function string.tohex(str)
return (str:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))
@Mikulas
Mikulas / Google.php
Created August 21, 2012 13:21
GoogleAuth
<?php
use \Nette\Utils\Json;
/**
* Minimalistic Google OAuth2 connector
* @author Mikuláš Dítě
* @license BSD-3
*/
class Google extends Nette\Object
@fprochazka
fprochazka / play.js
Created January 24, 2012 17:28 — forked from juzna/01-choose.png
GitHub Play
(function() {
var commits = [], repo = document.location.href.match(/github\.com\/([^\/]+\/[^\/]+)\//)[1];
// Play for all commits
$('.commit-group .commit-links')
.append($('<a href="#" class="browse-button github-play-select">Play</a>'));
// show next commit
var nextCommit = function () {
$('.site .container').load(commits.shift() + ' #.site .container', function () {
@fprochazka
fprochazka / HomepagePresenter.php
Created June 2, 2011 05:55 — forked from vaclavbohac/HomepagePresenter.php
Mobile device detection in Nette
<?php
class HomepagePresenter extends BasePresenter
{
public function actionDefault()
{
$detector = $this->context->detector;
if ($detector->isMobile()) {
$this->redirect("mobile");
[02:16:38] Limping immortal: nemel bych kosat ten kabel od sluchatek
[02:17:20] Limping immortal: nekose to
[02:17:21] Limping immortal: fuj
[02:17:28] Limping immortal: vyplivni
[02:17:31] Limping immortal: hned
[02:17:38] Limping immortal: hodnej