Skip to content

Instantly share code, notes, and snippets.

@ciptard
ciptard / markdown-cheatsheet.md
Last active August 29, 2015 14:26 — forked from jonschlinkert/markdown-cheatsheet.md
A better markdown cheatsheet. I used Bootstrap's Base CSS documentation as a reference.

Typography

Headings

Headings from h1 through h6 are constructed with a # for each level:

# h1 Heading
## h2 Heading
### h3 Heading
@ciptard
ciptard / eofy.mq4
Last active August 29, 2015 14:08 — forked from currencysecrets/eofy.mq4
//+------------------------------------------------------------------+
//| EoFY.mq4 |
//| Ryan Sheehy, CurrencySecrets.com |
//| http://www.currencysecrets.com |
/*
* DON'T FORGET TO SELECT "ALL HISTORY" FROM ACCOUNT HISTORY TAB!!!
* This script helps to calculate a summarised version of all trades
* done in a particular financial year. It converts all sales and
* purchase transactions into the base currency.
* 1. Loop through all HISTORICAL trades between a predetermined date
<?php
function fetch($url, $cookies = null, $returnCookie = false) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if($cookies){
curl_setopt($ch, CURLOPT_COOKIE, implode(';',$cookies));
}
curl_setopt($ch, CURLOPT_HEADER, 1);
<?
include 'spreadsheet.php';
$Spreadsheet = new Spreadsheet("email@example.com", "password");
$Spreadsheet->
setSpreadsheet("Tester")->
setWorksheet("Sheet1")->
add(array("Header 1" => "Cell 1", "Header 2" => "Cell 2"));
?>
@ciptard
ciptard / LICENCE
Last active August 29, 2015 14:07 — forked from markembling/LICENCE
Copyright (c) 2012, Mark Embling
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Mark Embling nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
/* background setup */
.background {
background-repeat:no-repeat;
/* custom background-position */
background-position:50% 50%;
/* ie8- graceful degradation */
background-position:50% 50%9 !important;
}
/* fullscreen setup */
<?php
/**
* A simple Facebook PHP example.
*
* - This is not a "Facebook SDK".
* - This example uses Curl, Hash, JSON, Session extensions.
* - This does not use the JavaScript SDK, nor the cookie set by it.
* - This works with Canvas, Page Tabs with IFrames, the Registration Plugin
* and with any other flow which uses the signed_request.