- http://minimal.be/lab/Sprite3D/ Sprite3D wraps HTML elements with the necessary behaviours to easily control their 3D-position using a simple Javascript syntax.
- http://daneden.me/animate/ animate.css gives CSS3 animations with CSS classes.
- http://www.greensock.com/css3/ (commercial) GSAP makes it easy to use 3D Transforms via JavaScript.
- http://css3please.com/ Not a library, but can be useful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('will POST data in JSON format', () => { | |
let promise = ajax('POST', '/somewhere', {foo: "bar"}) | |
.then((result) => { | |
expect(result).to.equal('OK'); | |
}); | |
expect(requests[0].requestBody).to.equal(JSON.stringify({foo: "bar"})); | |
requests[0].requestHeaders.should.have.property("Content-Type").with.length("application/json;charset=utf-8".length); | |
assert.propertyVal(requests[0].requestHeaders, "Content-Type", "application/json;charset=utf-8"); | |
expect(requests[0].requestHeaders).to.have.property("Content-Type", "application/json;charset=utf-8"); | |
requests[0].respond(200, {}, 'OK'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create multiple folders | |
$ mkdir -p source/tags/modules/{dob,grid,radio,set,telephone,text} | |
# Move multiple files by wildcard pattern | |
$ mmv "source/tags/modules/*.txt" "source/tags/modules/#1/#1.txt" | |
# Create multiple files by wildcard pattern (e.g. same name as their folder) | |
$ cd source/tags/modules | |
# then... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install postgres first (e.g. OS X): | |
brew install postgres | |
# After installation... if user not created: | |
# This is a wrapper around CREATE ROLE, you might not have it. | |
# BTW, a role is the same as a user. | |
# A role is an entity that can own database objects and have database privileges; | |
# a role can be considered a "user", a "group", or both depending on how it is used. | |
createuser --superuser postgres # -s works as well |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION isFoo(text) RETURNS BOOLEAN AS ' | |
SELECT $1 ~* ''insert_regex_here'' AS RESULT | |
' LANGUAGE SQL; | |
UPDATE blocks | |
SET content=(SELECT regexp_replace(content, 'insert_regex_here', 'insert_replace_text_here')); | |
;--WHERE isFoo(content); | |
SELECT * | |
FROM blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// Animation | |
// | |
#import "ViewController.h" | |
@interface ViewController () | |
@property (weak, nonatomic) IBOutlet UIImageView *image; | |
@property (strong, nonatomic) IBOutlet UILabel *label; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /.htaccess | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/public/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /public/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find: <pre>(((?!<\/pre>).|\n)+)<\/pre> | |
replace: ``` javascript\n$1\n``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lftp -e 'mirror -R -e -v public; bye' -u user,pass ftp://ftp.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Running pre-push hook..." | |
branch=`git rev-parse --abbrev-ref HEAD` | |
if [ $branch == "master" ]; then | |
echo "Deploying to FTP..." | |
git ftp push | |
echo "done!" | |
fi |