Skip to content

Instantly share code, notes, and snippets.

View jjhesk's full-sized avatar
💊
cybernetics

SodiDav jjhesk

💊
cybernetics
  • ZZY
View GitHub Profile
@jjhesk
jjhesk / Event.js
Created April 1, 2016 02:22
up vote 0 down vote accepted You can control this by specifying the format option, in your case you'd want to set it to false to disable the formatting entirely: FB_event_id: { type: Types.Number, format: false, required: true, initial: true } (I've just updated the docs to specifically mention that you can set this option to false to disable fo…
// models/Event.js
var keystone = require('keystone'),
Types = keystone.Field.Types;
var Event = new keystone.List('Event');
Event.add({
FB_event_id: { type: Types.Number, required: true, initial: true, format: false },
name: { type: Types.Text },
FB_event_name: { type: Types.Text },
@jjhesk
jjhesk / RealmRecyclerViewAdapter.java
Created March 9, 2016 06:05
realm with recyclerview adapter
public abstract class RealmRecyclerViewAdapter<T extends RealmObject, VH extends RecyclerView.ViewHolder>
extends RecyclerView.Adapter<VH> { //put this in `io.realm`
protected LayoutInflater inflater;
protected RealmResults<T> realmResults;
protected Context context;
private final RealmChangeListener listener;
public RealmRecyclerViewAdapter(Context context, RealmResults<T> realmResults, boolean automaticUpdate) {
if (context == null) {
throw new IllegalArgumentException("Context cannot be null");
package com.hypetrak.editorial.pages.list_2016;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.util.Log;
import android.view.View;
import com.hypebeast.sdk.api.exception.ApiException;
import com.hypebeast.sdk.api.model.hypetrak.htpost;
import com.hypebeast.sdk.api.resources.ht.hTrak;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
//Allows multiple SceneView cameras in the editor to be setup to follow gameobjects.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
public class SceneViewCameraFollower : MonoBehaviour
{
#if UNITY_EDITOR
@jjhesk
jjhesk / CharacterControllerLogic.cs
Last active February 10, 2016 17:44
Character Controller Logic
/// <summary>
/// UnityTutorials homepage: https://github.com/jm991/UnityTutorials
/// This software is provided 'as-is', without any express or implied
/// warranty. In no event will the authors be held liable for any damages
/// arising from the use of this software.
///
/// Permission is granted to anyone to use this software for any purpose,
/// and to alter it and redistribute it freely, subject to the following restrictions:
///
/// 1. The origin of this software must not be misrepresented; you must not
@jjhesk
jjhesk / FantasticCamera.cs
Created February 10, 2016 17:42
Fantastic Camera
/// <summary>
/// UnityTutorials - A Unity Game Design Prototyping Sandbox
/// <copyright>(c) HKM hesk 2014 </copyright>
///
///
/// This software is provided 'as-is', without any express or implied
/// warranty. In no event will the authors be held liable for any damages
/// arising from the use of this software.
///
/// Permission is granted to anyone to use this software for any purpose,
@jjhesk
jjhesk / FollowTrackingCamera.cs
Created February 10, 2016 17:41
Follow Tracking Camera
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class FollowTrackingCamera : MonoBehaviour
{
// Camera target to look at.
public Transform target;
private Transform check_target;
// Exposed vars for the camera position from the target.
@jjhesk
jjhesk / reflection_tween.cs
Created February 10, 2016 17:10
reflection problem issue
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[RequireComponent (typeof(LineRenderer))]
public class RaycastReflectionGameCom : MonoBehaviour
{
//this game object's Transform
private Transform goTransform;
//the attached line renderer
@jjhesk
jjhesk / redirection pie google app
Created January 14, 2016 08:03
this google app script is to build the redirection pie Uri
function httpredirectpie(url) {
var options = {
headers:{
"Accept":"application/json",
"X-Api-version":"2.0"
},
muteHttpExceptions: true,
followRedirects: false
};
var responose = UrlFetchApp.fetch(url, options);