Skip to content

Instantly share code, notes, and snippets.

@niceaji
niceaji / LICENSE.txt
Last active August 29, 2015 14:17 — forked from tkissing/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Timo Kissing http://kissing.name
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>template</title>
</head>
<body>
<div id="greeting"></div>
@niceaji
niceaji / Image-Comparison-Slider.markdown
Created April 9, 2015 04:26
Image Comparison Slider

Image Comparison Slider

Drag the slider to compare the images.

Was using Flipboard on my iPad and that had this cool image comparison slider. I decided to create one of my own.

The images are Dubai, UAE, 1990-2013.

There is a little problem that occurs, the jQuery drag does not fire the drag event every pixel. So if you move fast it can't keep up with it leaving the image behind the handle. Not sure how to get around this one.

/*
* draw a multiline string rotated in a canvas
*
* @param ctx (M) context of the canvas
* @param text (M) string may contain \n
* @param posX (M) horizontal start position
* @param posY (M) vertical start position
* @param textColor color
* @param rotation in degrees (by 360)
* @param font must be installed on client use websafe
<div class="#quiz_share">
<a href="#none" class="component-share-btn #kakaotalk" data-handler="kakaotalk" data-link="http://live.media.daum.net/packaging/a?component=news_1439769697137" data-prefix="[클래식 포커스] 여전한 제주, 수비만 해결하면 상위스플릿 ...">카카오톡</a>
<a href="#none" class="component-share-btn #kakaostory" data-handler="kakaostory" data-link="http://live.media.daum.net/packaging/a?component=news_1439769697137" data-prefix="[클래식 포커스] 여전한 제주, 수비만 해결하면 상위스플릿 ..." data-url_info[title]="[클래식 포커스] 여전한 제주, 수비만 해결하면 상위스플릿 ..." data-url_info[desc]="" data-url_info[imageurl]="http://m1.daumcdn.net/thumb/T430x0ht.u/?fname=http%3A%2F%2Ft1.daumcdn.net%2Fnews%2F201508%2F17%2Finterfootball%2F20150817050606617.jpeg">카카오스토리</a>
<a href="#none" class="component-share-btn #facebook" data-handler="facebook" data-facebook[picture]="http://m1.daumcdn.net/thumb/T430x0ht.u/?fname=http%3A%2F%2Ft1.daumcdn.net%2Fnews%2F201508%2F17%2Finterfootball%2F20150817050606617.jpeg" data-link="http://live.media.daum.net/packaging/a?component=n
var A_MENUS = {
a1: {
c1: ['a1-1'],
c2: ['a1-2-1', 'a1-2-2', 'a1-2-3'],
c3: ['a1-3-1', 'a1-3-2'],
c4: ['a1-4']
},
a2: {
<script src="https://samanco.kakaocorp.com/uploader/widget/waveuploader.widget.js"></script>
<script>
WaveUploader.init({
appKey: '59705d2977c86a9d4d1ba044',
cpKey: 'test',
userKey: 'test',
onError: function(){
},
onAdd: function(data) {
@niceaji
niceaji / index.js
Created December 31, 2017 11:10 — forked from yoshuawuyts/index.js
requirebin sketch
const choo = require('choo')
const app = choo()
app.model({
state: { title: 'Set the title' },
reducers: {
update: (action, state) => ({ title: action.value })
}
})
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
ReactDOM.render(
<h1>ss <Welcome name="aji" /> </h1>,
document.getElementById('root')
);
import React from 'react';
import PropTypes from 'prop-types';
const ArrowhSvg = ({ size, className }) => (
<svg
width={size}
height={size}
viewBox="0 0 1792 1792"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"