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
> sencha switch --list | |
//This gives the following output, depending on which versions you have installed on your machine: | |
Sencha Cmd 6.1.3.16 | |
Looking for versions at: /Users/leeboonstra/bin/Sencha/Cmd | |
Current version | |
6.1.3.16 | |
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
###################### | |
# Python # | |
###################### | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions |
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
1. First stop your droplet, and make a snapshot. | |
2. Login to you droplet | |
ssh root@<ip> | |
3. Go to https://certbot.eff.org/, select the setup for example Apache on Ubuntu 14 | |
This will give you the instructions | |
These are the instructions for Ubuntu 14, with Apache. | |
We will install Certbot: |
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
//sudo nano /etc/hosts | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost |
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
How to enable server caching | |
Install the following 2 mods: | |
$ sudo a2enmod expires | |
$ sudo a2enmod headers | |
Add this to the .htaccess | |
<IfModule mod_expires.c> | |
ExpiresActive On |
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
Ext.define('Dashboard.view.contacts.Chart', { | |
extend: 'Ext.d3.svg.hierarchy.tree.HorizontalTree', | |
xtype: 'departments-chart', | |
requires: [ | |
'Ext.d3.interaction.PanZoom' | |
], | |
nodeSize: [20, 70], | |
bind: { | |
store: '{department}', | |
selection: '{selection}' |
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
Ext.define("Engine.view.charts.MyD3Chart",{ | |
extend: "Ext.panel.Panel", | |
xtype: 'myd3chart', | |
requires: [ | |
'Ext.d3.svg.Svg' | |
], | |
layout: 'fit', | |
scrollable: true, | |
items: [{ | |
xtype: 'd3', |
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 store = Ext.getStore('Artists'); | |
var max = store.getCount(); | |
var i = 0, data = [], artists = []; | |
//I need two arrays, one with artist names, and one with playcounts. In my first try, I hardcoded it. Afterwards, I switched to a real store. | |
for(i; i<max; i++){ | |
artists.push(store.getAt(i).get('name')); | |
data.push(store.getAt(i).get('playcount')); | |
} |
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
Ext.define('Engine.model.LastFmResult', { | |
extend: 'Ext.data.Model', | |
requires: [ | |
'Ext.data.identifier.Sequential', | |
'SenchaCandyShared.proxy.lastfm.LastFm' | |
], | |
identifier: { | |
type: 'sequential', |
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
//Note the differences with both foo() functions | |
(function() { | |
console.log(typeof foo); // prints "function" | |
foo(); // logs "hello sencha" | |
function foo() { | |
console.log("hello sencha!"); | |
} |