This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'twilio-video' { | |
// this actually returns a CancelablePromise | |
export function connect(token: string, options: ConnectOptions): Promise<Room>; | |
export function createLocalTracks(options?: CreateLocalTracksOptions): Promise<LocalTrack[]>; | |
export interface ConnectOptions { | |
name: string; | |
tracks: (LocalTrack | MediaStreamTrack)[]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// esto lo podrias hacer en el archivo de file retrieval | |
var storage = require('./utils/storage'); | |
var files_path = join(common.system.paths.config, 'files.db'); | |
storage.init(files_path); | |
var una_funcion = function(cb) { | |
// Guardar un dato | |
storage.set('nombre_del_archivo', {ultimo_byte: 321321, otra_info: "hola"}, cb); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d := Response{ | |
XMLName: xml.Name{ | |
Local: "samlp:Response", | |
}, | |
SAML: "urn:oasis:names:tc:SAML:2.0:assertion", | |
SAMLP: "urn:oasis:names:tc:SAML:2.0:protocol", | |
ID: ar.Id, | |
Version: "2.0", | |
IssueInstant: ar.IssueInstant, | |
Destination: "https://www.google.com/a/preyproject.com/acs", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"reflect" | |
) | |
// Implements map by closure | |
type Mapper func(interface{}) interface{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis | |
RESQUE_QUEUE = 'resque:queue:%s' | |
def test(n=0): | |
r = redis.Redis() | |
r.rpush(RESQUE_QUEUE % 'notifications', '{"class":"EmailNotification","args":["hi","there %s"]}' % n) | |
if __name__ == '__main__': | |
for i in xrange(100): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
/* | |
Author: Rodrigo Aliste-Prieto ([email protected]) | |
Version: 1 | |
Date: 14 September 2013 | |
Tested on: Chrome, Safari and Firefox. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"flag" | |
"fmt" | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Python Client | |
import socket | |
import json | |
s.sendall(json.dumps({"method":"Search.Search", "params":[{"UserQuery":"providencia 229"}], "id":uuid.uuid4().hex})); print s.recv(1024) | |
*/ | |
package main | |
import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?><Response><Say lang="es">El codigo es 239212</Say></Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## views.py | |
import tempfile | |
import os | |
import commands | |
import cgi | |
from django import http | |
from django.views.decorators.csrf import csrf_exempt | |
from django.shortcuts import render |
NewerOlder