Skip to content

Instantly share code, notes, and snippets.

View tsubik's full-sized avatar

Tomasz Subik tsubik

View GitHub Profile
@tsubik
tsubik / error.js
Last active March 12, 2021 12:20
Pardot
pardotLogResult('error')
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
amazon:
service: S3Extended
access_key_id: <%= ENV.fetch('AWS_ACCESS_KEY_ID') {} %>
secret_access_key: <%= ENV.fetch('AWS_SECRET_ACCESS_KEY') {} %>
region: <%= ENV.fetch('AWS_REGION') %>
bucket: <%= ENV.fetch('S3_BUCKET_NAME') %>
root: <%= ENV['S3_FILES_PREFIX'] %>
cdn_url: <%= ENV['CLOUDFRONT_URL'] %>
upload:
volumes:
mediabox:
name: mediabox
driver: local
driver_opts:
type: cifs
device: ${MEDIABOX_URL}
o: username=${MEDIABOX_USERNAME},password=${MEDIABOX_PASSWORD},port=${MEDIABOX_PORT}

#Setting up Docker Machine on Raspberry PI

  1. SSH into the pi and install docker with curl -sSL https://get.docker.com | sh (If we let Machine try to install the Docker daemon it will fail.)
  2. Change the OS's ID so Docker Machine won't throw errors. sudo nano /etc/os-release and change the line that says ID=raspbian to ID=debian
  3. From a new terminal window run docker-machine create --driver generic --generic-ip-address YOUR-PIS-IP --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user pi --engine-storage-driver overlay2 MACHINE-NAME
@tsubik
tsubik / adapters.application.js
Created January 21, 2017 13:38
EF hasmany bug
import FirebaseAdapter from 'emberfire/adapters/firebase';
export default FirebaseAdapter.extend({
});
@tsubik
tsubik / adapters.application.js
Created May 16, 2016 11:23
EmberFire Embedded Relations
import Ember from "ember";
import FirebaseAdapter from "emberfire/adapters/firebase";
const { inject } = Ember;
export default FirebaseAdapter.extend({
firebase: inject.service()
});
@tsubik
tsubik / application.controller.js
Last active January 19, 2016 11:29
Promise rejections
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
actions: {
save() {
Ember.RSVP.reject("something not error object");
}
}
@tsubik
tsubik / XHRHelper.cs
Created September 27, 2014 13:14
XHRHelper for cordova that works on Windows Phone 8.1
using Microsoft.Phone.Controls;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Text;
using System.Windows;
@tsubik
tsubik / AddMigration.ps1
Created June 10, 2014 17:17
Powershell script to automate visual studio with creating migrations
#Author: Tomasz Subik http://tsubik.com
#Date: 2014-05-27
#License: MIT
Param(
[parameter(Mandatory=$false)]
[alias("n")]
$name = [System.Guid]::NewGuid().ToString(),
[parameter(Mandatory=$false)]
[alias("p")]
@tsubik
tsubik / application.css
Last active December 10, 2015 15:58
Twitter bootstrap asp.net mvc 4 and sass
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
max-width: 300px;
padding: 19px 29px 29px;
margin: 0 auto 20px;