Skip to content

Instantly share code, notes, and snippets.

@350d
350d / keybase.md
Created April 18, 2022 19:39
keybase.md

Keybase proof

I hereby claim:

  • I am 350d on github.
  • I am 350d (https://keybase.io/350d) on keybase.
  • I have a public key ASCJMuqnbWO2puwD3jG1oIcUNq5Wov_3p2wY9gnY7GbEsAo

To claim this, I am signing this object:

@350d
350d / config.json
Last active October 10, 2020 14:05 — forked from johannrichard/homebridge
Full install + Systemd Service for Homebridge
{
"bridge": {
"name": "Homebridge",
"username": "{MAC}",
"port": 51826,
"pin": "{PIN}"
},
"description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.",
@350d
350d / phpinfo.css
Created March 22, 2014 08:20
Styles for phpinfo();
html {
background: #fff;
margin:0;
padding:0;
}
body {
color: #233452;
height: 100%;
font-family: Verdana, Helvetica, sans-serif;
margin: 20px 0;
@350d
350d / cookie.js
Last active February 1, 2016 17:50
Simple library for Cookie manage
@350d
350d / google_rss.js
Created January 12, 2016 15:03
Google RSS
function getRSS(url) {
$.getJSON('http://www.google.com/uds/Gfeeds',
{
context: 0,
num: 10,
hl: 'en',
output: 'json',
v: '1.0',
nocache: 0,
q: url
@350d
350d / functions.php
Created October 9, 2013 21:02
Disqus comment manager fix for Wordpress
function dsq_fix() {
echo '<style type="text/css">div.dsq-main {height:100%;min-height:100%;}</style>';
}
add_action('admin_head', 'dsq_fix');
@350d
350d / gaerror.js
Created September 20, 2013 20:36
Google Analytics Javascript errors tracking
$(window).error(function (error) {
if (error && error.originalEvent) {
error = error.originalEvent;
var message, url, line;
if (error && error.message) {
message = error.message;
url = getfilename(error.filename);
line = error.lineno;
} else {
message = "(message empty)";
@350d
350d / script.js
Created March 4, 2013 21:27
Photoshop Square Crop
var savedRuler= app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var w = app.activeDocument.width;
var h = app.activeDocument.height;
if(w>h) app.activeDocument.resizeCanvas (w, w, AnchorPosition.MIDDLECENTER);
if(w<h) app.activeDocument.resizeCanvas (h, h, AnchorPosition.MIDDLECENTER);
app.preferences.rulerUnits = savedRuler;
@350d
350d / Fullpage.html
Created June 19, 2012 17:42
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Justified Menu / Block list &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
@350d
350d / 1_video.get
Created November 20, 2014 02:53
VK API / wall.get / video.get for 1 item / video.get for 2 item
print_r(json_decode(file_get_contents("https://api.vkontakte.ru/method/video.get?access_token=$token&owner_id=64842982&videos=64842982_170418653")));
stdClass Object
(
[response] => Array
(
[0] => 1
[1] => stdClass Object
(
[vid] => 170418653