Skip to content

Instantly share code, notes, and snippets.

View gerswin's full-sized avatar
🎯
Focusing

gerswin gerswin

🎯
Focusing
View GitHub Profile
@gerswin
gerswin / index.php
Created September 26, 2012 04:38 — forked from splitbrain/index.php
<?php
$OTS = '/usr/bin/ots';
loadurl();
if(!isset($_REQUEST['format']) || $_REQUEST['format'] =! 'text'){
header('Content-Type: text/html; charset=utf-8');
html_header();
form();
@gerswin
gerswin / 0_reuse_code.js
Created April 11, 2014 23:24
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
// ==UserScript==
// @name Laptop VIT
// @namespace http://use.i.E.your.homepage/
// @version 2.1
// @description enter something useful
// @match http://tienda.vit.gob.ve/inicio
// @require https://code.jquery.com/jquery-2.1.1.min.js
// @copyright 2012+, You
// ==/UserScript==
@gerswin
gerswin / inbstall
Created September 22, 2014 19:21
install.sh
#!/bin/bash
# FreeSWITCH Installation script for CentOS 5.5/5.6
# and Debian based distros (Debian 5.0 , Ubuntu 10.04 and above)
# Copyright (c) 2011 Plivo Team. See LICENSE for details.
FS_CONF_PATH=https://github.com/plivo/plivoframework/raw/master/freeswitch
FS_GIT_REPO=git://git.freeswitch.org/freeswitch.git
FS_INSTALLED_PATH=/usr/local/freeswitch
@gerswin
gerswin / image.js
Created October 16, 2014 20:31
image.js
var pixel=document.createElement("img");
pixel.setAttribute('src', 'http://coderanch.com/mooseImages/moosefly.gif');
pixel.setAttribute('alt', 'holabb');
document.getElementById('parawebs').appendChild(pixel);
@gerswin
gerswin / app.js
Created November 2, 2015 16:11 — forked from velsa/app.js
Express server used to launch ffmpeg, transcode stream from peerflix and serve it to HTML5 video tag
var express = require('express'),
http = require('http'),
path = require('path'),
child_process = require("child_process");
var app = express();
// Server settings
app.set('port', process.env.PORT || 9999);
app.use(express.favicon());
@gerswin
gerswin / getdata.php
Created December 4, 2015 18:21
productos y categorias mlv
$categories = [];
$count = count($it);
for ($i = 0; $i < $count ; $i++) {
$item = $meli->get("/items/" . $it[$i]);
$category = $meli->get("/categories/" . $item['body']->category_id);
$cats = [];
try {
foreach ($category['body']->path_from_root as $value) {
$cats[] = $value->id;
$categories[$value->id] = ["ml_id" => $value->id, "name" => $value->name];
@gerswin
gerswin / servers.sh
Last active December 15, 2015 20:17
ubuntu servers
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Improved for Ubuntu by gerswin from http://gerswin.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
@gerswin
gerswin / exito.js
Last active September 14, 2016 18:36
bolivares y usd en exito.com
// ==UserScript==
// @name Exito Price
// @namespace http://tampermonkey.net/
// @version 0.4
// @description bolivares y dolares en exito.com
// @author gerswin
// @require http://code.jquery.com/jquery-latest.js
// @match http://www.exito.com/*
// @grant none
// ==/UserScript==
from socketIO_client import SocketIO, LoggingNamespace
import pygame
import urllib
import subprocess
import glob
import os
#v5
def play(audio_file_path):
subprocess.call(["ffplay", "-nodisp", "-autoexit", audio_file_path])