Skip to content

Instantly share code, notes, and snippets.

View FrankFang's full-sized avatar
🎯
Focusing

Frank Fang FrankFang

🎯
Focusing
View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@FrankFang
FrankFang / simple_reset.css
Last active December 16, 2015 11:49
simple reset
* { margin: 0; padding: 0; }
ul, ol, dl { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: normal; }
body { font: 14px/1.6 tahoma, arial, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; }
a { text-decoration: none; color: #000; }
imgi { border: none; }
@gr2m
gr2m / account_dreamcode.js
Last active May 7, 2022 08:22
Imagine the typical backend tasks for user authentication would exist right in the browser. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// sign up
account.signUp('joe@example.com', 'secret');
// sign in
account.signIn('joe@example.com', 'secret');
// sign in via oauth
account.signInWith('twitter');
// sign out
@wintercn
wintercn / HTMLLexicalParser.js
Last active August 5, 2019 11:16
HTML语法分析器模型
function StartTagToken(){
}
function EndTagToken(){
}
function Attribute(){
}

==========

A useful tools or tips list for mobile web application developing

这个项目收集移动端开发所需要的一些资源与小技巧

一些非常重要的工具类网站

@ThomasBurleson
ThomasBurleson / PeopleListControllerSpec.js
Last active August 8, 2018 15:24
When using Karma, RequireJS, and AngularJS... demonstrate how Promise(s) callbacks are not auto-triggered when testing with Karma/Jasmine tests. Here we use a Controller and PeopleService with an API that returns Promises. While our mock service resolves the promise, we did that in the context of our test which is `outside` the AngularJS world. …
(function( describe ){
"use strict";
/**
* Demonstration of how to properly use Jasmine testing with AngularJS promise-based services.
*
* NOTE: based on the origina version from Jim Lavin's
* http://codingsmackdown.tv/blog/2012/12/28/mocking-promises-in-unit-tests/
*
* FIXED: Igor Minar fixed this on 8/22/2013. Check with v1.2.x master branch of AngularJS
@plentz
plentz / nginx.conf
Last active June 11, 2024 06:55
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@richardmcmillen-examtime
richardmcmillen-examtime / Repo
Last active January 29, 2022 00:10
Open a project file on GitHub.
#!/bin/bash
#
# Open the specified file on GitHub. It will use the master branch by default:
#
# repo -f app/controllers/application_controller.rb
#
# Specify a different branch:
#
# repo -b another-branch -f app/controllers/application_controller.rb
@Kenrick-Zhou
Kenrick-Zhou / devise.zh-CN.yml
Last active November 23, 2019 11:41 — forked from acenqiu/devise.zh-CN.yml
rails devise 3.5.2 I18n translations zh-CN
# Chinese (China) translations for Devise(3.5.2)
# by Kenrick-Zhou (https://github.com/Kenrick-Zhou)
# https://gist.github.com/Kenrick-Zhou/7909822
zh-CN:
devise:
confirmations:
confirmed: "您的帐号已经确认,您现在已登录。"
send_instructions: "几分钟后,您将收到确认帐号的电子邮件。"
send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。"
@abruzzi
abruzzi / contact-controller.js
Created December 31, 2013 14:25
nested views in angularjs
var app = angular.module('MyApp');
app.controller('ContactController', ['$scope', function($scope) {
$scope.contacts = ["juntao", "abruzzi"];
$scope.submit = function() {
$scope.$parent.toggleContactsPanel();
};
}]);