Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@beingsane
beingsane / gist:5c14a2291cde5215eff9
Created February 28, 2016 01:21 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@beingsane
beingsane / mr.robot_season-2_easter-egg-sites.md
Created July 14, 2016 13:58 — forked from eyecatchup/mr.robot_season-2_easter-egg-sites.md
A collection of "Mr. Robot" Season 2 Easter Egg Sites. #mrrobot #hackingrobot #robotegg
@beingsane
beingsane / README.md
Created September 26, 2016 20:18 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@beingsane
beingsane / setup_selenium.sh
Created March 28, 2017 13:28 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@beingsane
beingsane / Grub_Powerup.md
Created July 26, 2017 12:46 — forked from MaxLaumeister/Grub_Powerup.md
Grub Init Tune: Mario Bros. Mushroom Powerup

Grub Init Tune - Mario Bros. Mushroom Powerup

This Grub Init Tune will make your computer sound like a Super Mushroom every time you turn it on! This only works for the Grub bootloader - this generally means you need to have Linux (or other Grub-based OS) installed.

Here's the code, which goes in your /etc/default/grub file:

GRUB_INIT_TUNE="1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 1244 1 466 1 587 1 698 1 932 1 1195 1 1397 1 1865 1 1397 1"

Installation Instructions

@beingsane
beingsane / image_map.html
Created August 14, 2017 17:57 — forked from marcosbrasil/image_map.html
Mapeamento de Imagens em HTML
<html>
<head>
<script type="text/javascript">
function coordenadas(event)
{
var x=event.clientX;
var y=event.clientY;
var coord = x + "," + y;
return coord;
}
app.component.html
<ul class="nav navbar-nav navbar-right" *ngIf="usuario.verificaLogado">
<li><a href="../navbar/">Olá</a></li>
</ul>
usuario.component.ts
export class UsuarioComponent implements OnInit {
@beingsane
beingsane / vagrant + docker + windows 10.md
Created September 13, 2017 15:26 — forked from eibreans/vagrant + docker + windows 10.md
Passo a passo docker rodando sobre o vagrant no windows 10

A ideia é ter um Linux virtualizado no windows, que dê para rodar o docker e usar o vagrant como um sistema sobre o Windows. Para não precisar de fazer dual boot, já que tudo o que eu preciso é um terminal Linux que eu posso instalar qualquer coisa com apt-get :)

  1. Instalar no windos o cmder, um emulador de console http://cmder.net/

  2. Instalar virtual box https://www.virtualbox.org/wiki/Downloads

  3. Instalar o vagrant