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
<?php | |
// no argument, process demo json | |
if(!isset($argv[1])) | |
{ | |
$file = file_get_contents('data.json'); | |
} | |
else | |
{ | |
$file = file_get_contents($argv[1]); | |
} |
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
// onOpen se ejecuta cada vez que se abre el documento (spreadsheet) | |
function onOpen() { | |
// Se obtiene el user interface | |
var ui = SpreadsheetApp.getUi(); | |
// Se agregan las dos opciones del menú | |
ui.createMenu('Menu Calendario') | |
.addItem('Cargar Datos', 'setEventsFromCalendar') | |
.addSeparator() | |
.addItem('Limpiar Semana', 'clearWeek') | |
.addToUi(); |
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
# code for streaming twitter to a mysql db | |
# for Python 3 and will support emoji characters (utf8mb4) | |
# based on the Python 2 code | |
# supplied by http://pythonprogramming.net/twitter-api-streaming-tweets-python-tutorial/ | |
# for further information on how to use python 3, twitter's api, and | |
# mysql together visit: http://miningthedetails.com/blog/python/TwitterStreamsPythonMySQL/ | |
from tweepy import Stream | |
from tweepy import OAuthHandler |
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
//Replace xxx with your values as necessary. | |
function googleAnalyticsReporting() { | |
projectId = "xxx"; | |
datasetId = "xxx"; | |
tableId = 'xxx'; | |
data = []; | |
yesterday = new Date(); | |
yesterday.setDate(yesterday.getDate() - 1); | |
yesterday = Utilities.formatDate(yesterday, 'UTC', "yyyy-MM-dd"); |
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
<?php | |
echo "Running full GET requests... \n"; | |
$sum = 0; | |
for( $i = 1; $i <= 100; ++$i ) { | |
$start = microtime(true); |
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
<link rel="alternate" hreflang="x-default" href="{{ canonical_url | replace: shop.domain, 'www.mystore.com' }}" /> | |
<link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.mystore.com' }}" hreflang="en-GB" /> | |
<link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.us.mystore.com' }}" hreflang="en-US" /> | |
<link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.mystore.com' }}" hreflang="en" /> |
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
//+------------------------------------------------------------------+ | |
//| Signal2Channel.mq4 | | |
//| steven england | | |
//| https://Telegram4MQL.steven-england.info | | |
//+------------------------------------------------------------------+ | |
//+------------------------------------------------------------------+ | |
//| !!! Please note that there is a successor project. !!! | | |
//| Visit https://mmm.steven-england.info or | | |
//| https://github.com/stevenengland/MMM for more information | |
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
<?php | |
if ($curl = curl_init()) { | |
$hrefs = array( | |
'http://domain.com/page1.html', | |
'http://domain.com/page2.html', | |
'http://domain.com/page3.html', | |
'http://domain.com/page4.html', | |
'http://domain.com/page5.html', | |
); | |
foreach ($hrefs as $href) { |
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
from dataiku.scenario import Scenario | |
import dataiku | |
### Set up objects | |
# The Scenario object is the main handle from which you initiate steps | |
scenario = Scenario() | |
# The Project that we'll be working with | |
# set up an api client |