Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public class HexGridLayout : LayoutGroup { | |
const float SQUARE_ROOT_OF_3 = 1.73205f; | |
public enum Axis { Horizontal = 0, Vertical = 1 } | |
public enum Constraint { Flexible = 0, FixedColumnCount = 1, FixedRowCount = 2 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyecore.resources import ResourceSet | |
from pyecore.utils import dispatch | |
import pyecore.ecore as ecore | |
class PlantUMLSwitch(object): | |
def __init__(self): | |
self.visited = set() | |
@dispatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
set -g default-terminal screen-256color | |
set -g status-bg blue | |
set -g status-fg white | |
set -g status-right '#(sysctl vm.loadavg)' | |
setw -g window-status-current-attr underscore | |
bind r source-file ~/.tmux.conf | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
require 'cgi' | |
episodes = Array.new | |
doc = Nokogiri::HTML(open("http://www.notificationcenter.tv/feed.rss")) | |
episodes = doc.xpath("//item") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyecore.ecore import * | |
from pyecore.resources import ResourceSet | |
from pyecore.utils import dispatch | |
from enum import unique, Enum | |
from functools import wraps | |
import pyecore.ecore as ecore | |
from collections import namedtuple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Stripe WebGl Gradient Animation | |
* All Credits to Stripe.com | |
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and | |
* commented out for now. | |
* https://kevinhufnagl.com | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an official Python runtime as a parent image | |
FROM python:3.9-slim | |
# Install git | |
RUN apt-get update && \ | |
apt-get install -y git && \ | |
rm -rf /var/lib/apt/lists/* | |
# Set the working directory in the container | |
WORKDIR /usr/src/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
[CustomEditor(typeof(MeshFilter))] | |
public class NormalsVisualizer : Editor { | |
private const string EDITOR_PREF_KEY = "_normals_length"; | |
private Mesh mesh; | |
private MeshFilter mf; | |
private Vector3[] verts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# rotoscope - auto rotoscope a video file with openSource Software on Linux | |
# needs ffmpeg, autotrace and ImageMagick | |
# usage: rotoscope videofile //will create videofile.rotoscoped.avi | |
# created by Honza Svasek : HonzaSvasek.nl | |
# edited by Joseph Riopelle finitelife[at]hotmail.com | |
set -x | |
export TMPDIR=/tmp/rotoscope$$ | |
export FILM=$1 |
NewerOlder