Skip to content

Instantly share code, notes, and snippets.

@Reldas
Reldas / GoogleHomeRedirect.php
Created January 18, 2018 18:53
Redirect request from Google Home to Google Apps Script and pass back the result
<?php
function http_post($url, $data)
{
$data_url=$data;
$data_len = strlen ($data_url);
return array ('content'=>file_get_contents ($url, false, stream_context_create (array ('http'=>array ('method'=>'POST'
,'header' => "Content-type: application/x-www-form-urlencoded\r\n"
, 'content'=>$data_url
))))
, 'headers'=>$http_response_header
@Reldas
Reldas / Convert-MKVtoMP4.ps1
Created October 23, 2017 18:38
Convert MK4 files to MP4 lossless
ffmpeg -i /path/to/video.mkv -c:v copy -c:a copy /path/to/save/video.mp4
@Reldas
Reldas / 0_reuse_code.js
Created December 9, 2016 15:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Reldas
Reldas / import_cards.js
Created December 22, 2015 17:44
Trello: Add multiple cards bookmarklet
(function () {
var body = document.getElementsByTagName("body")[0];
var bg = document.createElement("div");
bg.setAttribute("style", "position: absolute; z-index: 1000; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.5)");
var form = document.createElement("div");
form.setAttribute("style", "margin: 0 auto; height: 100%; width: 800px; padding: 50px; background: rgb(200, 200, 220);");
form.appendChild(document.createTextNode("Board: "));
var list_select = document.createElement("select");
var lists = boardView.model.listList.models;