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 | |
namespace Codeception\Module; | |
/** | |
* Additional methods for DB module | |
* | |
* Save this file as DbHelper.php in _support folder | |
* Enable DbHelper in your suite.yml file | |
* Execute `codeception build` to integrate this class in your codeception | |
*/ |
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
on run {input, parameters} | |
tell application "Finder" | |
set dir_path to quoted form of (POSIX path of (folder of the front window as alias)) | |
end tell | |
CD_to(dir_path) | |
end run | |
on CD_to(theDir) | |
tell application "iTerm" | |
activate |
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'), | |
sass = require('gulp-ruby-sass'), | |
sourcemaps = require('gulp-sourcemaps'), | |
prefix = require('gulp-autoprefixer'), | |
watch = require('gulp-watch'), | |
plumber = require('gulp-plumber'), | |
filter = require('gulp-filter'), | |
browserSync = require('browser-sync'), | |
reload = browserSync.reload; |
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
{ | |
"snippets": { | |
"css": { | |
"abbreviations": { | |
"mqm": "@media screen and (min-width:${1}) {\n\t|\n}", | |
"mqx": "@media screen and (max-width:${1}) {\n\t|\n}" | |
} | |
} | |
} | |
} |
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 express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
var hbs = require('hbs'); | |
app.set('view engine', 'html'); | |
app.engine('html', hbs.__express); | |
app.use(express.json()); | |
app.use(express.urlencoded()); |
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
window.requestAnimFrame = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
function( callback ){ | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |
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
@mixin fontFace($family,$src,$style: normal,$weight: normal) { | |
@font-face { | |
font-family: $family; | |
src: url('#{$src}.eot'); // IE9 compat | |
src: url('#{$src}.eot?#iefix') format('embedded-opentype'), // IE8 and below | |
url('#{$src}.woff') format('woff'), // standards | |
url('#{$src}.ttf') format('truetype'), // Safari, Android, iOS | |
url('#{$src}.svg##{$family}') format('svg'); // legacy iOS | |
font-style: $style; |
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
preg_match('/>([^<]*)/i', $bread_item, $text); | |
$bread_item_text = preg_replace("/&#?[a-z0-9]+;/i", "", $text[1]); | |
$bread_item_text = '>' . truncate_utf8($bread_item_text, 50, TRUE, TRUE, 1) . '<'; | |
$bread_item_text = preg_replace('/>[^<]*</i', $bread_item_text, $bread_item); | |
$breadcrumb[$key] = $bread_item_text; |
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 success = Drupal.ajax.prototype.success; | |
Drupal.ajax.prototype.success = function (xmlhttprequest, options) { | |
success.apply(this, arguments); | |
// do stuff here | |
} |
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 point = new google.maps.LatLng(COORDS); | |
var data = "SOME_TEXT"; | |
var infowindow = new google.maps.InfoWindow({ | |
content: data | |
}); | |
var marker = new google.maps.Marker({ | |
position: point, | |
title:"SOME_TEXT" | |
}); | |
google.maps.event.addListener(marker, 'click', function() { |
NewerOlder