Skip to content

Instantly share code, notes, and snippets.

uptown uptown

Block or report user

Report or block uptown

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View HoverAnimation.js
import React, {useState} from 'react'
const HoverAnimation = () => {
const [triggered, setTriggered] = useState(false);
return <div onMouseEnter={() => setTriggered(true)} class={triggered? 'animation-class': 'default-class'} />;
}
@uptown
uptown / NSObject+UTFrameworkProtected.h
Last active Aug 29, 2015
iOS Auto-adjusting autolayout snippet with some tricks
View NSObject+UTFrameworkProtected.h
//
// NSObject+UTFrameworkProtected.h
// UTFramework
//
// Created by Juyoung Lee on 2014. 1. 2..
// Copyright (c) 2014년 Juyoung.me. All rights reserved.
//
#import <Foundation/Foundation.h>
// NSObject내에 저장된 callback을 실행시키는 핼퍼
View NSAttributedString+format.m
//
// NSAttributedString+format.m
// Chatterbox
//
// Created by Brent Royal-Gordon on 2/7/14.
// Copyright (c) 2014 Architechies. All rights reserved.
//
#import "NSAttributedString+format.h"
View gist:6731ad698b67fabc793d
import sleekxmpp
import logging
logging.basicConfig(level=logging.DEBUG)
class SendMsgBot(sleekxmpp.ClientXMPP):
"""
A basic SleekXMPP bot that will log in, send a message,
and then log out.
"""
View mongoengine_django_storage.py
import os
import datetime
from mongoengine.base import BaseField
from mongoengine.python_support import str_types
from django.core.files.storage import default_storage
from django.utils.encoding import force_str, force_text
class DjangoStorageFileWrapper(object):
View gist:5683332
class A(object):
def method1(self):
print "method1"
def __method1(self):
print "__method1"
class B(A):
You can’t perform that action at this time.