Skip to content

Instantly share code, notes, and snippets.

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

Rodolfo Silva RodolfoSilva

🏠
Working from home
View GitHub Profile
@basham
basham / nodejs-rfid.js
Last active July 17, 2023 04:06
Use NodeJS to read RFID ids through the USB serial stream.
/*
DESCRIPTION
-----------
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum:
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699
CODE REPOSITORY
---------------
https://gist.github.com/806605
@menny
menny / verify_appstore_in_app.php
Last active February 15, 2024 14:45
How to verify in-app purchases from AppStore and Market in PHP code (server-side)
function verify_app_store_in_app($receipt, $is_sandbox)
{
//$sandbox should be TRUE if you want to test against itunes sandbox servers
if ($is_sandbox)
$verify_host = "ssl://sandbox.itunes.apple.com";
else
$verify_host = "ssl://buy.itunes.apple.com";
$json='{"receipt-data" : "'.$receipt.'" }';
//opening socket to itunes
@matthewkastor
matthewkastor / CKEditor.SourceViewReplacer.js
Last active June 1, 2017 12:12
This class allows you to easily replace the source view in CKEditor with any web based code editor e.g. Ace, Code Mirror, etc.
/*jslint
indent: 4,
maxerr: 50,
white: true,
browser: true,
vars: true
*/
/*global
CKEDITOR
*/
@jbonney
jbonney / spotify_keybindings
Created June 9, 2013 13:22
Spotify - Linux key bindings. From XFCE / Ubuntu keyboard shortcuts configuration, assign the control command to their key. http://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious
@eduardosilva
eduardosilva / gist:8288209
Created January 6, 2014 19:21
Script to calculate age in javascript
birthday = Date.parse('2013/03/27');
age = ~~((Date.now() - birthday) / (31557600000));
@thomd
thomd / semantic-layout.html
Last active March 29, 2024 00:27
Standard HTML5 Semantic Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
<link href="stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
@chrisrzhou
chrisrzhou / README.md
Last active December 1, 2021 09:57
D3 Radar Chart

D3 Radar Chart

bl.ocks.org link

A radar chart visualizes multivariate data in a 2D chart of three or more quantitative variables represented on axes.

The project is created using AngularJS and D3.js.


Description

@vovkab
vovkab / gist:d9f76e3429cdf20a4e0c
Created January 13, 2016 18:05 — forked from ohmrefresh/gist:55149f68c41a148ae673
How to Server-side verification of Google Play subscriptions
1.create google app (google console)
Example:
Client ID xxx.apps.googleusercontent.com
Email address xxx@developer.gserviceaccount.com
Client secret xxx
Redirect URIs
https://localhost/oauth2callback
Javascript Origins
https://localhost
@subfuzion
subfuzion / curl.md
Last active April 27, 2024 14:16
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@usmansaleem
usmansaleem / instructions.txt
Last active October 12, 2019 18:13
Notes on building Firebird 2.5.4 on Alpine Linux (in docker)
apk add --no-cache --virtual=build-dependencies build-base ncurses-dev icu-dev tar
apk add --no-cache --virtual=build-dependencies --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ shadow
mkdir /work && cd /work
wget -O firebird-source.tar.bz2 http://downloads.sourceforge.net/project/firebird/firebird/2.5.4-Release/Firebird-2.5.4.26856-0.tar.bz2
tar --strip=1 -xf firebird-source.tar.bz2
#Patch rwlock.h (this has been fixed in later release of firebird 3.x)
sed -i '194s/.*/#if 0/' src/common/classes/rwlock.h