Skip to content

Instantly share code, notes, and snippets.

View rcknr's full-sized avatar

Sergii Kauk rcknr

View GitHub Profile
@antimatter15
antimatter15 / plusmute.user.js
Created June 30, 2011 16:13
Google+ Mute Keyboard Shortcut Userscript
// ==UserScript==
// @name Google+ Mute Keyboard Shortcut
// @namespace http://antimatter15.com/
// @description Mute conversations in your stream by hitting "m"
// @include https://plus.google.com/*
// @include http://plus.google.com/*
// @version 1.2
// ==/UserScript==
document.addEventListener('keydown', function(e){
@zhuowei
zhuowei / glasslabs.md
Last active December 17, 2015 14:29
Glass Labs experiments: what they do

Glass Lab Experiments

Updated: July 2nd (XE7)

Ron Amadeo of Android Police did a review of these experiments: http://www.androidpolice.com/2013/05/24/google-glasss-hidden-labs-features-ok-glass-everywhere-web-browsing-video-stabilization-and-more-video/

Google Glass has a series of Labs experiments that can be enabled on engineering or userdebug builds. Using APKTool, I've removed that restriction and now they can be enabled with root access.

To start, for example, the SOUND_SEARCH lab, type in a root shell

@pmuellr
pmuellr / kml2maps.py
Created August 31, 2012 05:45
read a .kml file, generate map images from Google Static Maps
#!/usr/bin/env python
# Copyright 2012 Patrick Mueller
# Licensed under the Tumbolia Public License (see bottom)
# uses Google Static Maps functionality
# https://developers.google.com/maps/documentation/staticmaps/
import os
import sys
@mmohiudd
mmohiudd / facebook-batchcall.php
Created May 8, 2014 22:21
Batch call with facebook-php-sdk-v4
<?php
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\GraphUser;
use Facebook\FacebookRequestException;
FacebookSession::setDefaultApplication('YOUR_APP_ID','YOUR_APP_SECRET');
// Use one of the helper classes to get a FacebookSession object.
// FacebookRedirectLoginHelper
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@subfuzion
subfuzion / gist:1128192
Created August 5, 2011 18:37
Git Tips: Reset, Clean - Remove untracked files and directories from the working tree when switching branches or checking out different commits.
git reset --hard
git clean -f -d
Description:
============
Git Tips: Remove untracked files and directories from the working
tree when switching branches or checking out different commits.
Explanation:
@pamelafox
pamelafox / jsonexport.js
Created June 27, 2011 23:58
JSON Export Apps Script
// Exports current sheet as JSON and displays in message box.
function exportJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var rowsData = getRowsData(sheet);
ss.msgBox(Utilities.jsonStringify(rowsData));
}
// getRowsData iterates row by row in the input range and returns an array of objects.
// Each object contains all the data for a given row, indexed by its normalized column name.
@lsauer
lsauer / gist:2907369
Last active January 17, 2022 09:59
Google Chrome special pages for memory, debug, resources, profiling, downloads...

####lsauer.com


###Overview of all chrome:// pages.

  • List by calling chrome://about/
  • Following is a direct dump from the 'about' page for reference

###List of Pages as per v20.xxx

@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
@troy
troy / send_remote_syslog.php
Last active April 6, 2023 18:19
Send UDP remote syslog message from PHP (RFC 3164)
# replace PAPERTRAIL_HOSTNAME and PAPERTRAIL_PORT
# see http://help.papertrailapp.com/ for additional PHP syslog options
function send_remote_syslog($message, $component = "web", $program = "next_big_thing") {
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
foreach(explode("\n", $message) as $line) {
$syslog_message = "<22>" . date('M d H:i:s ') . $program . ' ' . $component . ': ' . $line;
socket_sendto($sock, $syslog_message, strlen($syslog_message), 0, PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT);
}
socket_close($sock);