Skip to content

Instantly share code, notes, and snippets.

@brianpetro
brianpetro / linux-setup.sh
Created April 13, 2024 01:41 — forked from dhh/linux-setup.sh
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
var app = angular.module('myApp', []);
app.controller('accountsSummaryCtrl', function ($scope) {
$scope.accounts = [{
name: 'Assets',
balance: 4324.00,
subAccounts: [{
name: 'Bank Account',
balance: 2000
}, {
name: 'Cash',
<body ng-app="myApp">
<div ng-controller="accountsSummaryCtrl" class="summary">
<account ng-repeat="account in accounts" name="account"></account>
</div>
</body>
var app = angular.module('myApp', []);
app.controller('accountsSummaryCtrl', function ($scope) {
$scope.assetsAccount = {
name: 'Assets',
balance: 4324.00,
subAccounts: [{
name: 'Bank Account',
balance: 2000
}, {
name: 'Cash',
<script type="text/template" id="account-template">
<div class="account-area">
<div class="main-account-area">
<span class="toggle-handler" ng-click="toggleSubAccounts()">
<span ng-if="!subAccountsOpen" class="close"></span>
<span ng-if="subAccountsOpen" class="open"></span>
</span>
<span class="main-account-name">{{account.name}} </span>
<span class="main-account-balance">{{account.balance}}</span>
var app = angular.module('myApp', []);
app.controller('accountsSummaryCtrl', function ($scope) {
$scope.assetAccount = {
name: 'Assets',
balance: 4324.00,
subAccounts: [{
name: 'Bank Account',
balance: 2000
}, {
name: 'Cash',
<script type="text/template" id="account-template">
<div class="account-area">
<div class="main-account-area">
<span class="toggle-handler" ng-click="toggleSubAccounts()">
<span ng-if="!subAccountsOpen"> ^ </span>
<span ng-if="subAccountsOpen"> > </span>
</span>
<span class="main-account-name">{{account.name}}</span>
</div>
<ul class="sub-accounts-area" ng-if="subAccountsOpen">
var app = angular.module('myApp', []);
app.directive('account', function () {
return {
restrict: 'E',
scope: {},
template: $('#account-template').html(),
controller: function ($scope, $element, $attrs) {
$scope.subAccountsOpen = false;
$scope.toggleSubAccounts = function () {
$scope.subAccountsOpen = !$scope.subAccountsOpen;
<script type="text/template" id="account-template">
<div class="account-area">
<div class="main-account-area">
<span class="toggle-handler" ng-click="toggleSubAccounts()">^></span>
<span class="main-account-name">Assets</span>
</div>
<div class="sub_accounts-area" ng-if="subAccountsOpen">
sub accounts...
</div>
</div>
var app = angular.module('myApp', []);
app.directive('account', function () {
return {
restrict: 'E',
template: $('#account-template')
.html(),
controller: function ($scope,
$element, $attrs) {
$scope.subAccountsOpen =
false;