Skip to content

Instantly share code, notes, and snippets.

@fkztw
fkztw / korean_fish.py
Last active May 10, 2019 06:18
Yet another chatbot
#!/usr/bin/env python3
import itertools
whats = [
'自經區', '自貿區',
'摩天輪', '愛情摩天輪', '愛情產業鏈',
'發大財', '愛河的水甘甘', '選總統',
'迪士尼',

台灣地址解析

此篇紀錄處理門牌地址格式過程遇到的一些問題。

字串解析

地址-WIKI解說,台灣地址大致由下列部分組成

縣市_行政區_街道名稱_門牌編號

>EX: 台中市_中區_台灣大道1段_1號

@conancat
conancat / attictv.jobs.zh.md
Last active March 29, 2017 12:58
AtticTV 正在募集Web前端、後端兼職開發人員,以及UI與廣告設計人員。你可以隨時隨地、自由自在地工作。詳細資料如下!

誠徵:前端、後端開發人員,以及UI與廣告設計人員

SPOT News

職位:兼職/自由接案人員

  • 職務:前端、後端開發人員,以及UI與廣告設計人員
  • 若合作愉快,有機會轉正職!

責任:協助我們打造東南亞及亞太地區最棒的新聞應用程式!

@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@maximilianschmitt
maximilianschmitt / jobs.js
Created September 3, 2014 23:47
Automated MySQL backups to S3 with node.js
'use strict';
var mysqlBackup = require('./mysql-backup');
var schedule = require('node-schedule');
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup);
@petemcw
petemcw / 01-README.md
Last active February 2, 2024 11:50
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@aaronwaldon
aaronwaldon / 1) readme.md
Last active May 13, 2021 09:26
How to set up Gulp for Compass compilation and minification, JavaScript minification, livereloading, and use with ExpressionEngine.

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active May 7, 2024 16:41
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@denji
denji / nginx-tuning.md
Last active May 3, 2024 03:57
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

window.onerror = function(message, file, line) {
var sFormattedMessage = '[' + file + ' (' + line + ')] ' + message;
_gaq.push(['_trackEvent', 'Exceptions', 'Application', sFormattedMessage, null, true]);
}