Skip to content

Instantly share code, notes, and snippets.

View martincarlin87's full-sized avatar
💻

Martin Carlin martincarlin87

💻
View GitHub Profile
var handlePusher = function () {
var pusher = new Pusher([APP_KEY]);
var socket_id = null;
pusher.connection.bind('connected', function() {
socket_id = pusher.connection.socket_id;
});
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@martincarlin87
martincarlin87 / gulpfile.js
Last active April 15, 2024 07:08
Example gulpfile for PHP, SASS, Watching, Minifying, Optimising, Live Reload and Deploying
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');
@martincarlin87
martincarlin87 / deploy.php
Last active October 2, 2021 20:39
Deployer Laravel 5 Example
<?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 / deploy.php
Last active October 14, 2019 05:21
Deployer Laravel 5
<?php
namespace Deployer;
require 'recipe/laravel.php';
$repo_url = '';
$branch = 'master';
$server_url = '';
$user = '';
@martincarlin87
martincarlin87 / .dockerignore
Last active March 25, 2019 02:38
An attempt to Dockerise an existing Laravel App.
.git
.env
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 / gitlab-ci.yml
Created April 24, 2019 15:27
Compile SCSS in GitLab Pipeline Using Yarn
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
@martincarlin87
martincarlin87 / Character.swift
Created June 3, 2020 08:49
Swapi Character List Example
import Foundation
struct Character: Decodable, Hashable {
let name: String
let height: String
let mass: String
let hair_color: String
let skin_color: String
let eye_color: String
let birth_year: String
@martincarlin87
martincarlin87 / Character.swift
Created June 3, 2020 08:49
Swapi Character List Example
import Foundation
struct Character: Decodable, Hashable {
let name: String
let height: String
let mass: String
let hair_color: String
let skin_color: String
let eye_color: String
let birth_year: String