Before doing anything else, install those:
- VirtualBox: https://www.virtualbox.org/wiki/Downloads
- Vagrant: https://www.vagrantup.com/downloads.html
- git: http://git-scm.com/download/win
Before doing anything else, install those:
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.
For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.
This gives an ongoing list of file-type magic numbers.
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
/* Catmull-Rom interpolating splines in ES6 | |
---- | |
authors: Nicholas Kyriakides (2017) & Unknown | |
from: "A class of local interpolating splines" | |
Catmull, Edwin; Rom, Raphael | University of Utah, 1974 | |
Barnhill, Robert E.; Riesenfeld, Richard F. (eds.). | |
Computer Aided Geometric Design. | |
@summary |
Here's how I converted a whole batch of Stylus files to SASS without using a converter (none exist, that I'm aware of), converting each Stylus file manually, or programming my own Stylus->SASS converter, which would have entailed building a parser, and then generate SCSS from the AST.
First, grab sandr.py
here: https://github.com/jfgiraud/sandr
Then, in the directory of your Stylus files, run (if you have multiple directory levels, you can do similar task using find
):
for file in *.styl; do echo "/*! FILENAME: $file */" >tempfile; cat $file >>tempfile; mv tempfile $file; done
<!DOCTYPE html> | |
<html data-theme=dark> | |
<head> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<title></title> | |
<link href=http://fonts.googleapis.com/css?family=Fira+Sans:300,400,500,700,300italic,400italic,500italic,700italic rel=stylesheet> | |
<link href=http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic rel=stylesheet> | |
<link href="//fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic" rel=stylesheet type=text/css> | |
<link href=http://staticresource.com/basic.css rel=stylesheet> |
<?php | |
/** | |
* Plugin Name: Translation Updates Table | |
* | |
* @author Pascal Birchler <[email protected]> | |
* @license GPL2+ | |
*/ | |
/** | |
* Displays a table with available translation updates. |
Before doing anything else, install those:
license: apache-2.0 |