Skip to content

Instantly share code, notes, and snippets.

View alexfinnarn's full-sized avatar
🐙
Curious with tentacles

Alex Finnarn alexfinnarn

🐙
Curious with tentacles
View GitHub Profile
@alexfinnarn
alexfinnarn / gist:10789642
Created April 15, 2014 23:42
output of brew install php54
This file has been truncated, but you can view the full file.
alexs-mbp:~ alexfinnarn$ brew install -v php54
==> Downloading http://www.php.net/get/php-5.4.27.tar.bz2/from/this/mirror
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 1.8.7-358; Mac OS X 10.9.2) http://www.php.net/get/php-5.4.27.tar.bz2/from/this/mirror -C 0 -o /Library/Caches/Homebrew/php54-5.4.27.incomplete
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
100 11.7M 100 11.7M 0 0 208k 0 0:00:57 0:00:57 --:--:-- 239k
==> Verifying php54-5.4.27 checksum
tar xf /Library/Caches/Homebrew/php54-5.4.27
@alexfinnarn
alexfinnarn / gist:10789988
Last active August 29, 2015 13:59
out put of brew doctor and brew list
alexs-mbp:~ alexfinnarn$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
alexs-mbp:~ alexfinnarn$ php -v
PHP 5.4.27 (cli) (built: Apr 15 2014 19:35:47)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
@alexfinnarn
alexfinnarn / gist:ebd7d053381e3f693ca5
Last active August 29, 2015 14:18
Symfony2 Certification Prep Conversation
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Symfony2 Certification Prep Conversation</title>
<meta name="description" content="Symfony2 Certification Prep Conversation">
</head>
<body>
1. In twig, what do you use if you want to optimize the size of the generated HTML content?
<ul>
@alexfinnarn
alexfinnarn / map.vue
Created February 13, 2018 18:13
Let's Find Larry
<template>
<div>
<card v-show="!showMap"
:title="$t('Show Meetup Locations')">
<a href="#" @click.prevent="loadMap()">Looking for a Meetup with your current area?</a>
<br>
You are most likely in: {{this.userLocationGuess}}
</card>
<card>
<div v-if="!loading"
@alexfinnarn
alexfinnarn / gist:dc952be8c411c57487c997a6ba4846a7
Last active February 13, 2018 18:41
Get Location Once Mounted
mounted() {
let that = this;
var options = {
// enableHighAccuracy: true,
timeout: 8000,
maximumAge: 0
};
function success(pos) {
@alexfinnarn
alexfinnarn / gist:34e8be274b9d61677acc548783f49e30
Last active February 13, 2018 18:53
geocodeLocation() function
geocodeLocation(lat, long, that) {
// google object is in global scope loaded by vue-google-maps.
const geocoder = new google.maps.Geocoder;
geocoder.geocode({'location': {'lat': lat, 'lng': long}}, function(results, status) {
if (status === 'OK') {
// Make sure there is at least one result.
if (results[0]) {
// Find locality first and then state.
let placeName = '';
<template>
<gmap-autocomplete id="location-input"
@place_changed="setPlace"
placeholder=" "
class="form-control">
</gmap-autocomplete>
</template>
<script>
@alexfinnarn
alexfinnarn / hsc-blog01.js
Last active February 14, 2018 21:35
HelpScout Identify User
HS.beacon.ready(function() {
HS.beacon.identify({
name: user_name,
email: user_mail,
roles: roles,
site_name: site_name,
site_url: url,
org_name: org_name,
});
@alexfinnarn
alexfinnarn / helpscout-blog01-comment.php
Created February 19, 2018 17:50
My comments on HelpScout's date format.
// The created at date in HelpScout is a variation of the "ISO 8601" format.
// Since it isn't exactly the standard, we can't use date('c').
// Instead, we get yesterday in the form of 1-1-2018 and add that to the jacked up format.
// Shrug?
@alexfinnarn
alexfinnarn / db-slaves-01.txt
Created March 6, 2018 22:32
settings.php database comments
For each database, you may optionally specify multiple "target" databases.
A target database allows Drupal to try to send certain queries to a
different database if it can but fall back to the default connection if not.
That is useful for master/slave replication, as Drupal may try to connect
to a slave server when appropriate and if one is not available will simply
fall back to the single master server.
The general format for the $databases array is as follows:
@code
$databases['default']['default'] = $info_array;