Skip to content

Instantly share code, notes, and snippets.

View juhamust's full-sized avatar
⌨️
hackhack.

Juha Mustonen juhamust

⌨️
hackhack.
View GitHub Profile
@mauvm
mauvm / Jasmine-and-Babel6.md
Created November 12, 2015 10:51
Jasmine ES6 run script for use with Babel 6
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
 "presets": ["es2015"]

What to use

  • Test runner: ava
  • React components testing: enzyme
  • Endpoint testing: express + supertest
  • Mocking framework: sinon
  • External dependencies mocking: proxyquire

Test cases

all the following examples are using ava syntax, but they may be easily adapted to mocha or tape as well

@emiloberg
emiloberg / GaugeChart.js
Last active February 13, 2024 14:30
Gauge Chart with React Recharts (http://recharts.org)
import React from 'react';
import { Sector, Cell, PieChart, Pie } from 'recharts';
const GaugeChart = () => {
const width = 500;
const chartValue = 180;
const colorData = [{
value: 40, // Meaning span is 0 to 40
color: '#663399'
}, {
@colbywhite
colbywhite / _sls.sh
Created September 25, 2016 23:18
zsh completion for serverless v1.0
_sls_templates() {
_values \
'VALID TEMPLATES' \
'aws-nodejs' \
'aws-python' \
'aws-java-maven' \
'aws-java-gradle'
}
_sls_regions() {
@singledigit
singledigit / cognito.yaml
Last active June 4, 2024 05:19
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@shortjared
shortjared / list.txt
Last active June 13, 2024 14:59
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
// https://forums.oculusvr.com/community/discussion/57052/quill-fbx-to-unity3d#latest
Shader "Unlit/Quill Shader" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }