Skip to content

Instantly share code, notes, and snippets.

View stuf's full-sized avatar

Stef stuf

View GitHub Profile
@stuf
stuf / huutismittari.ux
Created November 16, 2016 19:09
Huutismittari version Bur
<App Background="#90CAF9">
<ClientPanel>
<!-- Huutis component -->
<Panel ux:Class="Huutis" TextColor="Black">
<string ux:Property="Level" />
<float4 ux:Property="Color" />
<float4 ux:Property="TextColor" />
<Text Alignment="Center" FontSize="40" Color="{Property TextColor}" Value="{Property Level}" />
</Panel>
import { fromJS } from 'immutable';
import { asNumber, formatLineBreaks } from '../primitive';
import { parseMaterialArray, asRecord } from './materials';
export const baseShip = (s) => fromJS({
shipId: asNumber(s.api_id),
sortId: asNumber(s.api_sortno),
flavorText: formatLineBreaks(s.api_getmes),
name: {
kanji: s.api_name,
module Collapse exposing (..)
import Html exposing (Html, text, div, button)
import Html.Attributes exposing (class, style)
import Html.Events exposing (onClick)
import Maybe exposing (withDefault)
-- MODEL
@stuf
stuf / read_a_file.js
Last active April 12, 2016 12:07
Read a file in FuseJS (or create it if it doesn't exist)
var Storage = require('FuseJS/Storage');
var Observable = require('FuseJS/Observable');
var shots = Observable();
var readSuccessful;
var readFun = function (result) {
readSuccessful = true;
var parsed = JSON.parse(result);
var count = parsed.length;
shots.replaceAll(parsed.map(function (it) { return new Shot(it) }));
@stuf
stuf / MainView.ux
Created January 4, 2016 11:38
`require` in JS file
<App Theme="Basic">
<JavaScript File="a.js" ux:Global="Test" />
<JavaScript>
var Test = require('Test');
module.exports = {
Test: JSON.stringify(Test)
}
</JavaScript>
<Panel>
@stuf
stuf / MainView.ux
Created October 31, 2015 00:43
kancollehelper
<App Theme="Basic">
<JavaScript File="node_modules/moment/moment.js" ux:Global="moment" />
<JavaScript>
var weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var improvements = [
// Sunday
[
{ flagship: ['Maya K2', 'Fubuki K2'], equip: 'T94 AAFD' },
{ flagship: ['Fusou'], equip: '35.6cm' },
{
"rules": {
"brace-style": [2, "stroustrup", { "allowSingleLine": true }],
"no-this-before-super": [2],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"no-console": [0],
"no-debugger": [0],
"no-unused-vars": [0],
#!/bin/bash
# This script builds (a subset of) the AlkuThree-Light font
# from source files made public by Opetushallitus (oph.fi).
# Whether or not this infringes on copyrights or other rights
# is anyone's guess.
#
# Prerequisites: wget & fontforge
# Optionally: fonttools (ttx) for repeatable builds
# (sha1 should probably be 5d2eba6728246b7050500b3c8cac4780f99f4728)
#!/bin/sh
if [ -z $EVENT ]; then echo "Event code (EVENT) required"; exit 1; fi
if [ -z $REEL ]; then echo "Reel identifier (REEL) required"; exit 1; fi
# Defaults for params
if [ -z $TAKE ]; then echo "Take identifier (TAKE) not specified, defaulting to \"A\"."; fi
# Set default resolution if none specified
if [ -z $IW ]; then IW=1920; fi
c(function() {
heachorGickerBollerferight + 'a' && parseIntAnimation('[structuralCatch').attr('data-acging-infied');
});