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 = "";
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@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();
}
@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
@klauswuestefeld
klauswuestefeld / gist:1103582
Created July 25, 2011 04:55
PrevaylerJr - "To serve the persistence needs of 99% of information systems in the world using 23 semicolons."
import java.io.*;
public class PrevaylerJr {
public static interface Command extends Serializable {
Object executeOn(Object system);
}
@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 {