Skip to content

Instantly share code, notes, and snippets.

@Sanchiz
Sanchiz / monobank-ynab.js
Created November 12, 2020 10:37 — forked from userhooke/monobank-ynab.js
Serverless script to link Monobank API and YNAB
const ynab = require("ynab");
const ynabAPI = new ynab.API(process.env.YNAB_TOKEN);
const adMaioraBudgetId = process.env.BUDGET_ID;
const monoDebitAccountId = process.env.MONO_DEBIT_ACCOUNT_ID;
module.exports.handler = (event, context, callback) => {
const body = JSON.parse(event.body);
console.log('Event body: ', body);
@Sanchiz
Sanchiz / setup.md
Created October 16, 2018 08:27 — forked from shashankmehta/setup.md
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@Sanchiz
Sanchiz / mac-php-composer-setup.md
Created October 16, 2018 08:27 — forked from tomysmile/mac-php-composer-setup.md
Setup PHP Composer using Brew
@Sanchiz
Sanchiz / gist:ca5e0596a8417536c2b56c06c4f39bff
Created April 4, 2017 18:08
Balsamiq Mockups keys for mac
2.2.x
Name : Sam
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw==
3.3.x
Username: personal
eJzzzU/OLi0odswsqilILSrOz0vMqbFEAjXONYY1fu6ufgA/CA4X
@Sanchiz
Sanchiz / 9191_config.php
Created August 16, 2016 05:43
This is a sample addition to the config.php for SimpleSAMLphp for Acquia Cloud.
<?php
// All custom changes below. Modify as needed.
// Defines account specific settings.
// $ah_options['database_name'] should be the Acquia Cloud workflow database name which
// will store SAML session information.set
// You can use any database that you have defined in your workflow.
// Use the database "role" without the stage ("dev", "stage", or "test", etc.)
//This file was last modified on Nov 4, 2015.
$ah_options = array(
'database_name' => 'mydatabasename',
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna
AZHU.storage = {
save : function(key, jsonData, expirationMin){
if (!Modernizr.localstorage){return false;}
var expirationMS = expirationMin * 60 * 1000;
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS}
localStorage.setItem(key, JSON.stringify(record));
return jsonData;
},
load : function(key){
if (!Modernizr.localstorage){return false;}
<?php
module_load_include('inc', 'ctools', 'includes/export');
// Load base enpoint and adding config for new subsite.
$base_taxonomy_endpoint = multisite_indicator_server_deploy_endpoints_default();
$endpoint = $base_taxonomy_endpoint['base_taxonomy_endpoint'];
$endpoint_url = $term->field_domain[LANGUAGE_NONE][0]['url'] . '/' . $endpoint->service_config['url'];
// Create machine name.