Skip to content

Instantly share code, notes, and snippets.

View sam210723's full-sized avatar

Sam sam210723

View GitHub Profile
@sente
sente / reddit.html
Created April 28, 2011 22:32
An example of a retrieving data from reddit's JSON(p) api using jquery
<!DOCTYPE html>
<!--
Stuart Powers
http://sente.cc/
http://twitter.com/stuartpowers
-->
<html>
<head>
@NTICompass
NTICompass / QRLogo.php
Created October 13, 2011 03:10
QR Code + Logo Generator
<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;
@Lauszus
Lauszus / gist:5019719
Created February 23, 2013 13:23
Avrdude write to eeprom
avrdude -p m644 -c usbasp -t
avrdude> write eeprom 0x00 0x00 0x20 0x41 0x00 0x00 0x80 0x3f 0x00 0x00 0x40 0x40 0x00 0x00 0x35 0x43
avrdude> dump eeprom 0 15
@mediaupstream
mediaupstream / ltc-mining.sh
Last active October 12, 2020 11:49
Litecoin CPU Mining setup on Ubuntu Server
#!/bin/bash
#
# Litecoin CPU Mining setup on Ubuntu Server
#
sudo apt-get update;
# install prerequisit software/libs
sudo apt-get -y install make automake build-essential libcurl4-openssl-dev htop
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@alexstone
alexstone / slack_notification.php
Created March 3, 2014 06:54
Fire a Slack Notification via CURL
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = "payload=" . json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@steverobbins
steverobbins / Paypal.php
Last active April 22, 2024 12:18
PayPal API Requests
<?php
class Paypal
{
/**
* API Version
*/
const VERSION = 51.0;
/**
@paulcuth
paulcuth / shim-global.lua
Last active December 9, 2017 09:44
A choice of quick cheats for those that don't have time to keep referring to the ESP8266 GPIO pin -> IO index map.
-- You could setup global vars:
for k,v in ipairs{3,10,4,9,2,1,nil,nil,nil,11,12,nil,6,7,5,8,0} do _G['GPIO'..k-1]=v end
-- and use them like this:
gpio.mode(GPIO2, gpio.OUTPUT)
gpio.write(GPIO2, gpio.WRITE)
@kleptog
kleptog / cantenna.md
Last active October 5, 2023 10:14
Cantenna mathematics
@celoyd
celoyd / hi8-anim-howto.md
Last active August 1, 2022 15:37
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work