Skip to content

Instantly share code, notes, and snippets.

<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) {
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: {
<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
/*
* 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
@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.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>template</title>
</head>
<body>
<div id="greeting"></div>
@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
function toast (msg) {
$('.toast').remove();
$("<div class='toast'><h3>" + msg + "</h3></div>")
.css({
display: "block",
opacity: 0.8,
position: "fixed",
padding: "7px",
"text-align": "center",
width: "270px",
@niceaji
niceaji / directive.js
Created September 13, 2014 15:19
directive example
var myModule = angular.module(...);
myModule.directive('directiveName', function (injectables) {
return {
restrict: 'A',
template: '<div></div>',
templateUrl: 'directive.html',
replace: false,
priority: 0,
transclude: false,
content.replace('/(<([^>]+)>)/ig,', '').