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/bash | |
### | |
# | |
# Copyright (c) 2013 KimSia Sim | |
# | |
# Ubuntu 13.04 vm to reinstall the Guest Additions | |
# | |
# partly inspired by https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server | |
# |
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
<VirtualHost test.localhost:80> | |
DocumentRoot "C:/Users/yada/Documents/GitHub/testapp/src/testapp/webroot" | |
ServerName test.localhost | |
ErrorLog "logs/testapp.local-error.log" | |
CustomLog "logs/testapp.local-access.log" combined | |
<Directory "C:/Users/yada/Documents/GitHub/testapp"> | |
AllowOverride All | |
Order Allow,Deny | |
Allow from all | |
Require all granted |
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 java.util.*; | |
import java.lang.*; | |
public class PuzzleSolved { | |
public static void main (String[] args) { | |
int m = 4; // m is the number of sub puzzles OR number of digits, e.g. 4 | |
int k = 2; // k is the puzzle difficulty OR bit space per digit, e.g. 2 | |
int maxDigitSize = (int) Math.pow(2, k) - 1; // e.g. we expect this to be 3 | |
int x = maxDigitSize + 1; // x represents the x-nary space we are in. binary means x is 2. |
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/bash | |
### | |
# | |
# Copyright (c) 2013 KimSia Sim | |
# | |
# Ubuntu 12.10 based make nginx config files in /etc/nginx/sites-available and /etc/nginx/sites-enabled for | |
# webapp.com built using cakephp | |
# Run this by executing the following from a fresh install of Ubuntu 12.10 server: | |
# |
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
[2013-08-11 16:53:52] ConvertEPub.INFO: Sleeping 10 seconds. [] [] | |
[2013-08-11 16:54:03] ConvertEPub.ERROR: No job found. [] [] | |
[2013-08-11 16:54:03] ConvertEPub.NOTICE: No Job found. [] [] | |
[2013-08-11 16:54:03] ConvertEPub.INFO: Sleeping 10 seconds. [] [] | |
[2013-08-11 16:54:13] ConvertEPub.INFO: Running chained new job () with workers ["DownloadS3Files"] [] | |
[2013-08-11 16:54:13] ConvertEPub.INFO: Running new job (1) with worker: DownloadS3Files [] [] |
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
<script type="text/html" id="resultItemTemplate"> | |
<% _.each(Site, function (site) { %> | |
<a href="#"><%= site.name %></a> | |
<% }); %> | |
</script> |
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
<div class="voucherCategories container_16"> | |
<div class="grid_16" style="text-align: center" > | |
<?php echo $this->element('products_link_bar'); ?> | |
<h2><?php echo __('Edit ' . $this->Form->value('VoucherCategory.name')); ?></h2> | |
</div> | |
<?php echo $this->Form->create('VoucherCategory'); ?> | |
<fieldset class="grid_16"> | |
<?php | |
echo $this->Form->input('id'); |
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
public function successfulSomething($data) { | |
$email = $this->email; | |
$email->subject('You have successfully done something:' . $data['title']); | |
$email->template('successful_done'); | |
$email->sendAs = 'text'; | |
$email->viewVars($data); | |
if (EMAIL_ON) { | |
$result = $email->send(); | |
} else { | |
$result = $email; |
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
<div ng-repeat='item in my_works.items'> | |
<!-- if index mod 3 == 0 show <div>--> | |
<!-- if index mod 3 == 2 show </div>--> | |
</div> |
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 fetchMyWorks = angular.module('fetchMyWorks', ['infinite-scroll']); | |
var bookContainerHeight = 341; | |
var bookContainerWidth = 180; | |
var gapBetweenEachColumn = 13; | |
var gapBetweenEachRow = 13; | |
var initial = 46; // height from top | |
var defaultHeight = 662; | |
fetchMyWorks.controller('StoriesController', function($scope, MyWorks) { |