Skip to content

Instantly share code, notes, and snippets.

<template>
<div>
<div class="TVChartContainer" id="tv_chart_container"/>
</div>
</template>
<script>
import api from './api/index'
export default {
name: 'TVChartContainer',
@amitkaps
amitkaps / LICENSE
Created August 12, 2017 11:29
Unit Chart Small Multiple
The MIT License (MIT)
Copyright (c) 2017 Amit Kapoor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@drnextgis
drnextgis / admin.md
Last active December 10, 2022 03:22
Extract administrative boundaries from citypopulation.de as GeoJSON

Open page, for example, and type the following commands into web browser's console and copy output to file:

script = document.createElement('script');
document.head.appendChild(script);

script.onload = function () {
    polygons = [];
    adminLayer.forEach(function (polygon) {
        linearRing = [];
@mfd
mfd / 06.png
Last active April 4, 2024 02:23
Gilroy font
06.png
extension AVAsset {
func videoOrientation() -> (orientation: UIInterfaceOrientation, device: AVCaptureDevicePosition) {
var orientation: UIInterfaceOrientation = .Unknown
var device: AVCaptureDevicePosition = .Unspecified
let tracks :[AVAssetTrack] = self.tracksWithMediaType(AVMediaTypeVideo)
if let videoTrack = tracks.first {
let t = videoTrack.preferredTransform
@SheffieldKevin
SheffieldKevin / movietracks.swift
Last active November 7, 2020 14:47
Playing with movie tracks using AVFoundation in Swift (command line version)
#!/usr/bin/env swift
import Foundation
import AVFoundation
if Process.arguments.count != 2 {
println("The first and only argument should be a full path to a movie or music file.")
exit(1)
}
@NathanSweet
NathanSweet / Illustrator-LayersToPNG.jsx
Last active October 15, 2018 06:53
Adobe Illustrator script to export to Esoteric Software's Spine: http://esotericsoftware.com/
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
@NathanSweet
NathanSweet / Photoshop-LayersToPNG.jsx
Last active November 7, 2023 04:09
Adobe Photoshop script to export to Esoteric Software's Spine: http://esotericsoftware.com/
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
<?php
/*
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch)
---------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
@PrimaryFeather
PrimaryFeather / gist:5983685
Last active February 29, 2020 09:35
Water distortion filter, implemented with Starling's "DisplacementMapFilter".
private function addDistortionTo(target:DisplayObject):void
{
var offset:Number = 0;
var scale:Number = Starling.contentScaleFactor;
var width:int = target.width;
var height:int = target.height;
var perlinData:BitmapData = new BitmapData(width * scale, height * scale, false);
perlinData.perlinNoise(200*scale, 20*scale, 2, 5, true, true, 0, true);