- Boot2Docker Host:
- Game Server: A Ubuntu 14.10 docker image based off houki/arma3
- Database Server: official mariadb docker image
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
HOST=http://radarr.local:7878 | |
API_KEY= # Settings > General | |
ids=$(curl --silent $HOST/api/movie -X GET -H "X-Api-Key: $API_KEY" \ | |
| jq '.[] | select(.monitored == false) | .id') | |
for id in $ids; do | |
echo "Deleting movie id $id" | |
curl --silent $HOST/api/movie/$id -X DELETE -H "X-Api-Key: $API_KEY" | |
done |
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
#!/bin/sh | |
# @author: Alexandre Plennevaux | |
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
# | |
# FTP LOGIN | |
HOST='sftp://ftp.domain.com' | |
USER='ftpusername' | |
PASSWORD='ftppassword' | |
# DISTANT DIRECTORY |
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
'use strict'; | |
/** | |
* Authentication with token and email for every server request. (Sets HTTP headers) | |
* | |
* This interceptor shows the error from the server (i18n key). | |
* Also sets global error variable if the request fails and redirects the user to '/' when he is not authorized. | |
* @see http://engineering.talis.com/articles/client-side-error-logging/ | |
*/ | |
app.factory('authInterceptor', function ($rootScope, $q, $cookies, $location, $timeout) { |
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
/** | |
* Simple localStorage with Cookie Fallback | |
* v.1.0.0 | |
* | |
* USAGE: | |
* ---------------------------------------- | |
* Set New / Modify: | |
* store('my_key', 'some_value'); | |
* | |
* Retrieve: |
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
app.directive('faFastScroll', ['$parse', function ($parse) { | |
var Interval = function(min, max) { | |
this.min = min || 0; | |
this.max = max || 0; | |
}; | |
Interval.prototype.clip = function(min, max) { | |
if(this.max <= min || this.min >= max) { | |
this.min = this.max = 0; |
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 http = require('http'); | |
var NG_PREFIX = ")]}',\n"; | |
http.ServerResponse.prototype.ngJSON = function(obj){ | |
// allow status / body | |
if (2 == arguments.length) { | |
// res.json(body, status) backwards compat | |
if ('number' == typeof arguments[1]) { | |
this.statusCode = arguments[1]; |
title | sidebar |
---|---|
Segment Event Tracking for Shopify |
Shopify |
Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.
The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.
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
import express from 'express'; | |
const app = express(); | |
if (IS_DEV) { | |
require('piping')(); // https://www.npmjs.com/package/piping -- live reload app - replaces nodemon | |
} | |
//express routes, etc. | |
export default app; |