Skip to content

Instantly share code, notes, and snippets.

View uknownothingsnow's full-sized avatar
:octocat:

Young for you uknownothingsnow

:octocat:
  • Open Source
  • singapore
View GitHub Profile
var ChatRoom = function ChatRoom(chatList, inputArea, list) {
var _chatList = chatList,
_inputText = inputArea,
_userList = list,
_nickList = [];
/*
* Handle three events from the communications layer
*/
this.expose = {
/**
*
* Here's a thing that will look through all the text nodes of a document, and
* upon encountering an emoji codepoint, will replace it with an image.
* For now, those images are pulled from GitHub, which isn't very nice, so I
* need to find a more suitable host.
*
* Much of this code was gleaned from staring at the minified GitHub JS.
*
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License.
import java.lang.reflect.Type;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class MapData {
private int id;
private String city;
private String street;
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},

Applications of Cognitive Theory in Data Modeling and Software Design

Written as both a refresher course on the mechanics of cognition in human psychology, and as the beginning of a working theory, wherein one might make some deductions from human psychology to broadly advance/improve the design of server software and data models for the industry en masse.

c. Mike McNeil, 2013-2014 All Rights Reserved.

What's the point of this? I think psychology will inevetiably instruct the future of software design, in the same way neurobiology is beginning to impact the hardware engineering industry. >

public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
➜  go-sqlite3 git:(master) ✗ go build -compiler gc
# github.com/mattn/go-sqlite3
gcc did not produce error at completed:1
on input:
#line 3 "/Users/shouding/dev/go/fis/src/github.com/mattn/go-sqlite3/sqlite3.go"
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>

#[Tutorial] Android unit testing with Gradle, Robolectric, Dagger and Mockito Not long ago I faced the problem of setting up Gradle, Robolectric and Dagger for unit testing my app. And after tinkering a bit, I managed to make them all work together. In this tutorial I assume that you know how to work with Gradle, Robolectric, Dagger and Mockito separately.

I'm just going to show that they can work together pretty neatly, and how can they make Android testing a lot easier ##Wiring Robolectric and Gradle First of all, you're going to need a fully set up Android project ready to be built with Gradle. And I'm assuming that you're using default project layout (e.g. your java sources are located in $projectDir/src/main/java/)

For the next step we need to install a [Gradle Android test plugin][1] to a local maven repository: