Skip to content

Instantly share code, notes, and snippets.

View WeiChiaChang's full-sized avatar
🐻
How bear you

WesleyZen WeiChiaChang

🐻
How bear you
  • Planet Earth
  • Tainan, Taiwan
View GitHub Profile
@mathiasbynens
mathiasbynens / change-favicon.js
Created June 7, 2010 12:41
Dynamically changing favicons with JavaScript
/*!
* Dynamically changing favicons with JavaScript
* Works in all A-grade browsers except Safari and Internet Explorer
* Demo: http://mathiasbynens.be/demo/dynamic-favicons
*/
// HTML5™, baby! http://mathiasbynens.be/notes/document-head
document.head || (document.head = document.getElementsByTagName('head')[0]);
function changeFavicon(src) {
@ansonparker
ansonparker / gist:1228449
Created September 20, 2011 05:48
Lossless FLV to MP4 conversion
Open command prompt (Terminal) and run:
ffmpeg -i "filename.flv" -vcodec copy -acodec copy "filename.mp4"
This will copy video track and audio track from filename.flv to filename.mp4. The operation is lossless (there is no quality loss).
@gre
gre / easing.js
Last active May 17, 2024 03:33
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@tiendq
tiendq / jquery.ui.datepicker-vi-VN.js
Created March 27, 2013 08:01
Vietnamese localization for the jQuery UI date picker plugin. Tested with jQuery UI 1.10.2
/* Vietnamese localization for the jQuery UI date picker plugin. */
/* Written by Tien Do (tiendq@gmail.com) */
jQuery(function ($)
{
$.datepicker.regional["vi-VN"] =
{
closeText: "Đóng",
prevText: "Trước",
nextText: "Sau",
@willurd
willurd / web-servers.md
Last active June 3, 2024 01:13
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kerimdzhanov
kerimdzhanov / random.js
Last active June 2, 2024 00:43
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能

@yang-wei
yang-wei / fullscreen.css
Last active June 6, 2024 06:56
Full size background image using CSS cover in mobile devices
html {
background: url(image url) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
overflow: hidden;
}
@iqbalhasnan
iqbalhasnan / index.html
Last active July 7, 2016 00:53
Bootstrap 3 + Salvattore - A jQuery Masonry/Isotope alternative with CSS-driven configuration. See it live here : http://codepen.io/tobsn/pen/EPdejY
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap 3 + Salvattore Example, A 'jQuery Masonry' alternative with CSS-driven configuration.</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="salvattore.css">
</head>
<body>