A Pen by Sonya Corcoran on CodePen.
This file contains hidden or 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
#include <unistd.h> | |
void ft_putchar(char c) | |
{ | |
write(1, &c, 1); | |
} | |
void ft_print_comb2(void); | |
int main() |
This file contains hidden or 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
def example(a) # function a | |
b = [] # b is an empty array | |
for i in 0..a # for every (i)ndex in the range 0 to a (or 4 in this example) | |
b[i] = i # not clear how this works. I think it's a shorthand for .push | |
# More importantly, I don't know why you have to assign the position of the index in the array to i | |
end # end of loop | |
return b #return b | |
end # end of function |
This file contains hidden or 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
<?xml version="1.0" ?> | |
<kml xmlns="http://www.opengis.net/kml/2.2"> | |
<Document> | |
<Name>USyd Buildings</Name> | |
<Placemark> | |
<name>1-3 Ross Street</name> | |
<description>Campus: Camperdown<br>Building Code: K06</description> | |
<Point> | |
<coordinates>151.184341,-33.884591</coordinates> | |
</Point> |
This file contains hidden or 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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
This file contains hidden or 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
var request = require('request'); | |
var app = require('express')(); | |
var results; | |
function logRes(){ | |
console.log(results); | |
} | |
app.get('/storeData', minion1(req,res){ | |
readResult(logRes) |
This file contains hidden or 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
// performs the specified action on each item in the array | |
Array.prototype.forEach = function (fnAction) { | |
var l = this.length; | |
for (var i = 0; i < l; ++i) { | |
fnAction(this[i]); | |
} | |
} | |
// returns an array containing the items matching the filter | |
Array.prototype.where = function (fnFilter) { |
This file contains hidden or 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
# Sources | |
# johngibby.com/blog/How_to_deploy_your_meteor.js_app_on_Digital_Ocean | |
# stackoverflow.com/questions/20117104/mongodb-root-user | |
# digitalocean.com | |
# Create a Digital Ocean Ubuntu 14.04 Droplet | |
# You'll receive an email with your new IP and Password | |
# e.g. | |
# Droplet Name: dropletname | |
# IP Address: 000.000.000.000 |
Here are some notes I've made to help you guys with your syntax. Think of it like a "cheatsheet". Some tips to remember:
- Keep an eye on semicolons, usually control flow blocks (
if
blocks,for, while
loops etc.) do not need a semicolon. - Keep an eye on your opening and closing brackets (
{ & }
). - Be careful when using assignment operators (
=
) and equality operators (== and ===
). Assignment is for setting, equality is for comparing. - Keep an eye on quotation marks. Match doubles with doubles (
"
), singles with singles ('
).- Also: Watch when you're using apostrophes inside strings:
var sentence = "You're weird";
.
Make sure you don't do this:var sentence = 'You're weird';
This will give you errors.
- Also: Watch when you're using apostrophes inside strings:
- When checking conditions with logical operators (
&&, ||, !
), you cannot combine your conditions. - Incorrect:
if ( chicken === yummy && tasty )
This file contains hidden or 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
// Highcharts CheatSheet Part 1. | |
// Create interactive charts easily for your web projects. | |
// Download: http://www.highcharts.com/download | |
// More: http://api.highcharts.com/highcharts | |
// 1. Installation. | |
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks. | |
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
// <script src="https://code.highcharts.com/highcharts.js"></script> |
NewerOlder