Skip to content

Instantly share code, notes, and snippets.

@j3ffgray
j3ffgray / .bashrc
Created August 20, 2019 07:19
bashrc colors
LS_COLORS='rs=0:di=1;32:ln=01;32:mh=00:pi=40;33:so=01;32:do=01;32:bd=40;33;01:cd=40;33;01:or=40;31;01:su=32;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=32;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;32:*.jpeg=01;32:*.gif=01;32:*.bmp=01;32:*.pbm=01;32:*.pgm=01;32:*.ppm=01;32:*.tga=01;32:*.xbm=01;32:*.xpm=01;32:*.tif=01;32:*.tiff=01;32:*.png=01;32:*.svg=01;32:*.svgz=01;32:*.mng=01;32:*.pcx=01;32:*.mov=01;32:*.mpg=01;32:*.mpeg=01;32:*.m2v=01;32:*.mkv=01;32:*.webm=01;32:*.ogm=01;32:*.mp4=01;32:*.m4v=01;32:*.mp4v=01;32:*.vob=01;32:*.qt=01;32:*.nuv=01;32:*.wmv=01;32:*.asf=01;32:*.rm=01;32:*.rmvb=01;32:*.flc=01;32:*.avi=01;32:*.fli=01;32:*.flv=01;32:*.gl=01;32:*.dl=01;32:*
using UnityEngine;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public class UdpSrvrSample : MonoBehaviour {
public static void Main() {
byte[] data = new byte[1024];
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 9050);
@j3ffgray
j3ffgray / DynamicScale
Created August 7, 2017 17:34
Great Little Scale Tweak for GameObject in Unity - https://hastebin.com/fanosiwava.cs
using UnityEngine;
[ExecuteInEditMode]
public class DynamicScale : MonoBehaviour
{
Vector3 lastPosition;
void Start()
{
lastPosition = transform.position;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class TriangleExplosion : MonoBehaviour {
public IEnumerator SplitMesh (bool destroy) {
if(GetComponent<MeshFilter>() == null || GetComponent<SkinnedMeshRenderer>() == null) {
@j3ffgray
j3ffgray / Multiples
Created February 19, 2016 23:38
Text Overlay Template, openFrameworks Examples
// in the ofApp.h
// ... additional initialization code ...
bool bHelpText;
// in the ofApp.cpp
void ofApp::setup(){
bHelpText = true;
@j3ffgray
j3ffgray / README.md
Last active February 19, 2016 23:16
Example README.md for openFrameworks Examples Documentation

#About advancedGraphicsExample

Screenshot of advancedGraphicsExample

Learning Objectives

This example demonstrates how to list all files in a directory and how how to access them.

In the code, pay attention to:

  • filtering the files by enabling certain file extensions
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
@j3ffgray
j3ffgray / ffffound.com.js
Created March 30, 2012 21:24
Pinterested ffffound using dotjs
/**
* jQuery Masonry v2.1.03
* A dynamic layout plugin for jQuery
* The flip-side of CSS Floats
* http://masonry.desandro.com
*
* Licensed under the MIT license.
* Copyright 2011 David DeSandro
*/
(function(a,b,c){"use strict";var d=b.event,e;d.special.smartresize={setup:function(){b(this).bind("resize",d.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",d.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",e&&clearTimeout(e),e=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Mason=function(a,c){this.element=b(c),this._create(a),this._init()},b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}},b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return b?a.filter