Skip to content

Instantly share code, notes, and snippets.

👍

Martin Carlin martincarlin87

👍
Block or report user

Report or block martincarlin87

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@martincarlin87
martincarlin87 / gitlab-ci.yml
Created Apr 24, 2019
Compile SCSS in GitLab Pipeline Using Yarn
View gitlab-ci.yml
stages:
- compile
- deploy
compile:
stage: compile
image: node:8.15-alpine
script:
- yarn global add node-sass
- node-sass ./content/themes/carlin/assets/sass/input.scss ./content/themes/carlin/assets/css/screen.css --style compressed
View Download and Import Database Backups from S3
The AWS CLI can be used for downloading recent database backups from S3.
First, you need to install it, on OS X, you can do `brew install awscli`, otherwise you can follow the [official documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html).
Confirm it's working by running `aws --version`.
Next, setup a new profile by running `aws configure --profile [PROFILE_NAME]` and enter the `AWS Access Key ID`, `AWS Secret Access Key`, `Default region name` and `Default output format` (`text`).
To see a list of files for a particular date, run:
@martincarlin87
martincarlin87 / .dockerignore
Last active Mar 25, 2019
An attempt to Dockerise an existing Laravel App.
@martincarlin87
martincarlin87 / deploy.php
Last active Oct 14, 2019
Deployer Laravel 5
View deploy.php
<?php
namespace Deployer;
require 'recipe/laravel.php';
$repo_url = '';
$branch = 'master';
$server_url = '';
$user = '';
@martincarlin87
martincarlin87 / deploy.php
Last active Jul 31, 2019
Deployer Laravel 5 Example
View deploy.php
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Configuration
set('ssh_type', 'native');
set('repository', '[REPO URL]');
set('branch', 'master');
set('keep_releases', 5);
@martincarlin87
martincarlin87 / gulpfile.js
Last active Feb 14, 2020
Example gulpfile for PHP, SASS, Watching, Minifying, Optimising, Live Reload and Deploying
View gulpfile.js
var gulp = require('gulp');
var gutil = require('gulp-util');
var argv = require('minimist')(process.argv);
var prompt = require('gulp-prompt');
var rsync = require('gulp-rsync');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync');
var useref = require('gulp-useref');
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
View gist:951189121b45f5394dbc
var handlePusher = function () {
var pusher = new Pusher([APP_KEY]);
var socket_id = null;
pusher.connection.bind('connected', function() {
socket_id = pusher.connection.socket_id;
});
You can’t perform that action at this time.