Skip to content

Instantly share code, notes, and snippets.

View germanviscuso's full-sized avatar
🏠
Working from home

German Viscuso germanviscuso

🏠
Working from home
View GitHub Profile
@satoshikumano
satoshikumano / CountQueryUnity.mkd
Created March 24, 2014 07:22
Count Query in Unity
using UnityEngine;
using System.Collections;
using System.Net;
using System.IO;
using JsonOrg;

public class NewBehaviourScript : MonoBehaviour {

	private string message = "";
@Itslet
Itslet / Sessionfactory.cs
Created January 9, 2011 21:44
Db4o Sessionfactory
using Db4objects.Db4o;
using System.Linq;
using Db4objects.Db4o.Linq;
using System.Web;
using System.IO;
using System;
using System.Collections.Generic;
namespace Web.Infrastructure {
@kings13y
kings13y / MinimalRestServer.scala
Created August 9, 2011 22:05
Sample Rest style service using just Scala and Java 6 annotations
package output
import javax.xml.bind.{ Marshaller, JAXBContext }
import javax.xml.bind.annotation._
import javax.xml.bind.util.JAXBSource
import javax.xml.transform.Source
import javax.xml.ws.{ Endpoint, Provider, ServiceMode, WebServiceContext, WebServiceProvider }
import javax.xml.ws.http.HTTPBinding
import javax.xml.ws.handler.MessageContext
import javax.annotation.Resource
@germanviscuso
germanviscuso / NdefConverter.java
Created January 11, 2012 16:09
NFC utility classes for Android
package android.stickynotes;
import android.nfc.NdefRecord;
public interface NdefConverter {
public NdefRecord asNdef();
}
@krhoyt
krhoyt / parse.ino
Last active March 16, 2017 22:55
Arduino Yun to Parse.com (Process, curl).
// Original:
// http://hypernephelist.com/2014/08/19/https_on_arduino_yun.html
// Libraries
#include <Process.h>
// Literals
// #define DEBUG
// Constants
@aondio
aondio / install_ask_cli.sh
Created October 12, 2018 16:28
script to install ask-cli
sudo apt-get update
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --lts
npm install -g ask-cli
const upsInterceptor={
async process(handlerInput){
let { requestEnvelope, serviceClientFactory, attributesManager} = handlerInput;
let {deviceId} = requestEnvelope.context.System.device;
const upsServiceClient = serviceClientFactory.getUpsServiceClient();
const usertimeZone = await upsServiceClient.getSystemTimeZone(deviceId);
const requestAttributes = attributesManager.getRequestAttributes();
requestAttributes.timeZone = usertimeZone;
attributesManager.setRequestAttributes(requestAttributes);
console.log(JSON.stringify(attributesManager.getRequestAttributes()));
@GianlucaGuarini
GianlucaGuarini / a.js
Last active April 18, 2019 14:17
Use always `module.exports = Object.freeze({})`
const b = require('./b')
b.b = 'c'
module.exports = {
a: 'a'
}
@monoceros-tech
monoceros-tech / handlers.js
Last active August 24, 2019 21:49
Snippet de un handler de ejemplo de cómo dar al usuario tiempo a responder - juego (Veo Veo)
const LaunchRequest_Handler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
return request.type === 'LaunchRequest';
},
handle(handlerInput) {
let response = handlerInput.responseBuilder;
let say = `Estamos en salón. `;
say += `Veo veo, ¿qué ves? una cosita, ¿qué cosita es? Empieza por la letra A `;
@KayLerch
KayLerch / en-US.js
Last active February 17, 2021 06:39
Optimized i18n request interceptor for Alexa custom skills in Node. Loads only required language assets from external files and provides some convenient functions to read them. Will also let you store localized settings represented as JSON objects in your language files.
module.exports = Object.freeze({
translation: {
welcome: 'Howdy',
images: [
{
background: 'https://image/en-US.png'
},
{
background: 'https://image/en-US2.png'
},