Skip to content

Instantly share code, notes, and snippets.

@jexchan
jexchan / example02.py
Last active Dec 20, 2019
Python Turtle 精讲 example02
View example02.py
#定义画多边形函数
import turtle
t = turtle.Turtle() #命名一个简化的名称
t.shape('turtle') #设定小光海龟来画图
# t.speed(0)
def polygon(length, sides):
for i in range(sides):
t.forward(length)
@jexchan
jexchan / InertialBounce.jsx
Created Apr 23, 2018 — forked from animoplex/InertialBounce.jsx
Inertial Bounce - After Effects Expression by Animoplex
View InertialBounce.jsx
// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.
// Full Tutorial: https://www.youtube.com/watch?v=653lxeVIyoo
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
@jexchan
jexchan / introrx.md
Created Mar 4, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
@jexchan
jexchan / sbtmkdirs.sh
Last active Aug 29, 2015 — forked from alvinj/sbtmkdirs.sh
A shell script to create an SBT project directory structure
View sbtmkdirs.sh
#!/bin/bash
#------------------------------------------------------------------------------
# Name: sbtmkdirs
# Purpose: Create an SBT project directory structure with a few simple options.
# Author: Alvin Alexander, http://alvinalexander.com
# Info: http://alvinalexander.com/sbtmkdirs
# License: Creative Commons Attribution-ShareAlike 2.5 Generic
# http://creativecommons.org/licenses/by-sa/2.5/
#------------------------------------------------------------------------------
@jexchan
jexchan / .tmux.conf
Created May 12, 2014
my tmux configuration
View .tmux.conf
unbind C-b
set -g prefix C-a
setw -g mode-keys vi
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "reloaded config file!"
View Rails CMS alternatives
Rails CMS alternatives
======================
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then.
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
View AngularJS-BootStrap-3-Modal-Dialogs.markdown

AngularJS BootStrap 3 Modal Dialogs

A dialog/modal service written in AngularJS, creates predefined easy to use dialogs (error,wait,notify,confirm,create) with Angular UI and Bootstrap 3

A Pen by jexchan on CodePen.

License.

@jexchan
jexchan / .tmux.conf
Created Jan 21, 2014
my personal tmux conf
View .tmux.conf
unbind C-b
set -g prefix C-a
setw -g mode-keys vi
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "reloaded config file!"
View Search-bar.markdown
You can’t perform that action at this time.