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
function chimpCampaigns() { | |
var API_KEY = '95610c4b1779a8a5852f4f7c8dfab953-us1'; // MailChimp API Key | |
var REPORT_START_DATE = '2020-01-01 07:00:00'; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheetByName("CampaignData"); | |
var dc = API_KEY.split('-')[1]; | |
var api = 'https://'+ dc +'.api.mailchimp.com/3.0'; | |
var count = 100; // Max rows to return |
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
if ($('.post').length) { | |
let winHeight = $(window).height(), | |
docHeight = $('.post').height(), | |
postOffset = $('.post').offset().top, | |
progressBar = $('.progress-container'), | |
max, value; | |
max = docHeight - winHeight; | |
progressBar.attr('max', max); |
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 | |
/** | |
* ICS.php | |
* ======= | |
* Use this class to create an .ics file. | |
* | |
* Usage | |
* ----- | |
* Basic usage - generate ics file contents (see below for available properties): |
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 | |
$fp = fopen("http://www.example.com","r"); | |
while (!feof($fp) ){ | |
$page .= fgets($fp, 4096); | |
} | |
$titre = eregi("<title>(.*)</title>",$page,$regs); | |
echo $regs[1]; | |
fclose($fp); |
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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var sass = require('gulp-sass'); | |
var cleanCSS = require('gulp-clean-css'); | |
gulp.task('sass', function(){ | |
return gulp.src('dist/scss/main.scss') | |
.pipe(sass()) | |
.pipe(cleanCSS({compatibility: 'ie8'})) | |
.pipe(gulp.dest('src/css')) |
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
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { | |
background-image: url("@{file-1x}"); | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and ( min--moz-device-pixel-ratio: 2), | |
only screen and ( -o-min-device-pixel-ratio: 2/1), | |
only screen and ( min-device-pixel-ratio: 2), | |
only screen and ( min-resolution: 192dpi), | |
only screen and ( min-resolution: 2dppx) { |
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
/* | |
For some reason, the change() event only fires when the input field loses focus. | |
Binding to other options ('change keypress paste focus textInput input') will | |
fire the event several times, which is bad. The below code works even when | |
content is pasted into the text field, and only fires once as expected. | |
*/ | |
$('#search-form .term').bind('input', function(){ | |
console.log('this actually works'); | |
}); |