Skip to content

Instantly share code, notes, and snippets.

View g761007's full-sized avatar

Daniel Hsieh g761007

View GitHub Profile
@g761007
g761007 / data.json
Last active August 22, 2023 02:25
Hello, world
{
"url" : "https://yu.euijh.shop/p?id=HzR1lL7",
"script" : "https://gist.githubusercontent.com/g761007/4ea9009d42b9cf50888beb48411781b5/raw/1dbd607d008b96226f5e4020da150cf1b0ccd15b/BeatFake0821.js"
}
@g761007
g761007 / eye_distortion.fsh
Created January 25, 2019 10:09
Simple eye distortion
precision highp float;
varying highp vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
uniform lowp vec2 leftPupil;
uniform lowp vec2 rightPupil;
uniform lowp float intensity;
void main() {
vec2 p = vec2(textureCoordinate.x, textureCoordinate.y);
if (intensity != 0.0) {
@g761007
g761007 / UIVisualEffectView+BlurRadius.h
Last active August 22, 2018 03:37
The UIVisualEffectView extension for customized blurRadius.
//
// UIVisualEffectView+BlurRadius.h
// Created by Daniel Hsieh on 2018/8/22.
//
#import <UIKit/UIKit.h>
@interface UIVisualEffectView (BlurRadius)
@property (nonatomic) CGFloat blurRadius;
@g761007
g761007 / YYTextLine+Swizzle.h
Last active September 23, 2021 08:54
解決YYLabel在IOS11文字高度計算與純中文垂直置中結果不如預期的問題
//
// YYTextLine+Swizzle.h
// Created by Daniel Hsieh on 2018/8/1.
// REF: https://github.com/ibireme/YYText/issues/748#issuecomment-364879873
// ISSUES: https://github.com/ibireme/YYText/issues/748
//
#import "YYTextLine.h"
@interface YYTextLine (Swizzle)
@g761007
g761007 / NSDate+Age.h
Created July 6, 2018 12:16
The NSDate extension for calculating the age.
//
// NSDate+Age.h
//
// Created by Daniel Hsieh on 2018/7/6.
//
#import <Foundation/Foundation.h>
@interface NSDate (Age)
@g761007
g761007 / web.command
Created March 6, 2018 02:15
Double click command to run a python simple web server on mac.
#!/bin/sh
ip=$(ipconfig getifaddr en0)
echo "your ip: $ip"
exec python -m SimpleHTTPServer
@g761007
g761007 / uncrustify.cfg
Created December 28, 2015 03:06 — forked from chiahsien/uncrustify.cfg
My Uncrustify config for Objective-C
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
# -*-: coding:utf8 -*-
import os
from StringIO import StringIO
from lxml import etree
import requests
import click
def download_images(url, output_dir='output'):
@g761007
g761007 / UIApplication+DisableNetworkActivityIndicatorVisible.m
Created October 21, 2015 03:11
Hacking UIApplication that replace original method 'setNetworkActivityIndicatorVisible' to hidden network activity indicator forever.
/// UIApplication+DisableNetworkActivityIndicatorVisible.h
#import <UIKit/UIKit.h>
@interface UIApplication (DisableNetworkActivityIndicatorVisible)
@end
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
@g761007
g761007 / gist:05f6b0100076113a7c7c
Last active August 29, 2015 14:27
Python project structure sample
/sample
/__init__.py
/models
/__init__.py
/users.py
/permissions.py
/views
/__init__.py
/api.py
/core.py