Skip to content

Instantly share code, notes, and snippets.

View joeangel's full-sized avatar
📚
Working on Crypto

JoeAngel.tw joeangel

📚
Working on Crypto
View GitHub Profile
@brocoo
brocoo / Extensions.swift
Last active April 12, 2021 13:27
Swift UIImage extension for base64 conversion
// MARK: - UIImage (Base64 Encoding)
public enum ImageFormat {
case PNG
case JPEG(CGFloat)
}
extension UIImage {
public func base64(format: ImageFormat) -> String {
@ascendbruce
ascendbruce / gist:ed51360753edf7ce1fd8
Last active February 6, 2016 10:57
Fetch facebook graph object scrape information clear cache in command line
curl -X POST -F "id={the url}" -F "scrape=true" "https://graph.facebook.com"
# from http://stackoverflow.com/questions/12100574/is-there-an-api-to-force-facebook-to-scrape-a-page-again
@seyhunak
seyhunak / uialertcontroller.swift
Created July 18, 2014 07:32
UIAlertController and UIAlertAction in Swift (iOS8)
// Declaring UIAlertController
var alert = UIAlertController(title: "Welcome!", message: "You logged in!", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Continue", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
// Handling UIAlertController Actions
alert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { action in
switch action.style{
case .Default:
@HamptonMakes
HamptonMakes / RBResizer.swift
Created June 27, 2014 14:45
Swift Image Resizer
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
//
import UIKit
@rkjha
rkjha / wordpress_nginx_config.conf
Last active March 17, 2023 10:23
a sample wordpress config for nginx
server {
listen 80;
root /home/username/example.com;
index index.php index.html;
server_name example.com;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
@xboston
xboston / phalcon-events.list
Created December 24, 2013 19:08
Phalcon events:list
dispatch:beforeDispatchLoop
dispatch:beforeDispatch
dispatch:beforeNotFoundAction
dispatch:beforeExecuteRoute
dispatch:afterInitialize
dispatch:afterExecuteRoute
dispatch:afterDispatch
dispatch:afterDispatchLoop
dispatch:beforeException
@denny0223
denny0223 / PHPConf 2013 IRC log
Created October 5, 2013 17:04
PHPConf 2013 IRC log
--- Day changed Sat Oct 05 2013
06:50 -!- mode/#phpconf-tw [+o TigerHuang] by ChanServ
06:51 -!- TigerHuang changed the topic of #phpconf-tw to: PHPConf Taiwan 2013 http://phpconf.tw/2013/ | UTF-8
06:55 < davihuan> 大家好 www
06:55 <@TigerHuang> DennyHuang: 你是掛了一年嗎XD?
08:41 < BarneyChen_lL> 大家好
08:59 < elleryq> 怎麼好像沒什麼人用 IRC ??
08:59 < jeremy5189> Hello
09:00 < elleryq> Hello
09:02 < jasteralan> 大家早XD
@hanksudo
hanksudo / Front-end-Developer-Interview-Questions-TC.md
Last active August 30, 2025 14:31
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@stephenmckinney
stephenmckinney / .tmux.conf
Created December 3, 2012 20:47
Vim + Tmux + Mac OS X Clipboard (pbcopy) integration
# Mac OS X clipboard integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Optional keybindings: Enter Copy-mode and Copy and Paste sorta like Vim.
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
@jcsrb
jcsrb / gist:1081548
Created July 13, 2011 23:05
get avatar from google profiles, facebook, gravatar, twitter, tumblr
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version