Skip to content

Instantly share code, notes, and snippets.

vec3 hsv2rgb(float h, float s, float v) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(h + K.xyz) * 6.0 - K.www);
return v * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), s);
}
#ifdef GL_ES
precision highp float;
#endif
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
import Controller from '@ember/controller';
import { reads } from '@ember/object/computed';
export default Controller.extend({
children: reads('model'),
actions: {
clickChild(child) {
child.parent.then(parent => {
console.log(parent.name);
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@riklomas
riklomas / directions.sh
Created September 28, 2018 21:08 — forked from hhff/directions.sh
SSL Proxy for Multi Tenant Sites on AWS
ssh -i your_key.pem ec2-user@YOUR_EC2_IP
sudo yum-config-manager --add-repo https://openresty.org/package/amazon/openresty.repo
sudo yum install openresty
sudo yum install openresty-resty
# if https://openresty.org/package/amazon/2/x86_64/repodata/repomd.xml: \[Errno 14\] HTTPS Error 404 - Not Found
# sudo vim /etc/yum.repos.d/openresty.repo
# exchange the $releasever placeholder of the baseurl to “latest” baseurl=https://openresty.org/package/amazon/latest/$basearch.
rails generate model Job tweet_embed:text
body {
font-family: Helvetica, Arial;
font-size: 16px;
line-height: 1.5;
background: #ecf0f1;
color: #444444;
width: 960px;
margin: 40px auto;
def profile_image=(file_data)
unless file_data.blank?
@file_data = file_data.read
e = file_data.original_filename.split(".").last.downcase
self.profile_image_file = e
end
end
@riklomas
riklomas / rikify.html
Created February 13, 2012 15:28 — forked from jgwhite/rikify.html
Rikify
<!doctype html>
<html>
<head>
<title>Rikify</title>
<style type="text/css">
#button {
font-family: Lucida Grande;
font-size: 11px;
text-decoration: none;
font-weight: bold;
@riklomas
riklomas / loz-tipsy-1
Created February 7, 2012 14:41 — forked from lawrencebrown/loz-tipsy-1
tipsy start
<script type="text/javascript">
(function ($) {
$(function () {
$('ul.dd li').tipsy({gravity: $.fn.tipsy.autoNS});
});
})(jQuery);
</script>