Skip to content

Instantly share code, notes, and snippets.

View daslicht's full-sized avatar

Marc Wensauer daslicht

View GitHub Profile
Ship.php
/**
* @ORM\ManyToOne(targetEntity="Producer", inversedBy="ship")
* @ORM\JoinColumn(name="producer_id", referencedColumnName="id")
*/
protected $producer;
...
Producer.php
class Beer {
...
function show($f3, $params) {
$f3->set('foo','bar');
$f3->set('content','welcome.htm');
$template=new Template;
echo $template->render('layout.htm');
app.js bin node_modules package.json public routes test views
root@vps58220:/node/mongonative# npm --loglevel verbose install mongodb
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '--loglevel',
npm verb cli 'verbose',
npm verb cli 'install',
npm verb cli 'mongodb' ]
npm info using npm@1.4.3
beforeFileUploadCallback: function(files, e) {
console.log(e);
var file = files[0];
var reader = new FileReader();
reader.onload = function(fileLoadEvent) {
Meteor.call('uploadImage', file, reader.result, function(error, vo) {
});
};
app.factory('uploadImage', function() {
var url = "/images";
function uploadFiles(fileList,callback){
...
}
function init(item){
$(item).editable({
inlineMode: true,
beforeFileUploadCallback: function (files) {
<div class="vtemfilter_form"><form id="vtem_form" action="index.php/2012-12-13-08-52-53/joomla-user/user-registration" method="post">
<div class="Location_vtem vtem_label">
<div id="vtemfilter_Location" class="vtemfilter_oholder"><select class="vtemselect">
<option class="first_option vtemoptions" selected="selected" value="1">Location</option>
<option class="vtemoptions" value="4">CA, Los Angeles, 90057</option>
<option class="vtemoptions" value="10">CA, Los Angeles, 90057</option>
<option class="vtemoptions" value="5">CO, Denver, 80203</option>
<option class="vtemoptions" value="7">Las Vegas, NV 89212</option>
<option class="vtemoptions" value="3">NY, New York, 10022</option>
<option class="vtemoptions" value="6">NY, New York, 10022</option>
///themes/simple/templates/Includes/Sidebar.ss
Tutorial:
<ul>
<% loop $Menu(2) %>
<li class="$LinkingMode">
<a href="$Link" title="Go to the $Title.XML page">
<span class="arrow">&rarr;</span>
<span class="text">$MenuTitle.XML</span>
</a>

SilverStripe SkyScrapers Example

simple example of DataObjects
managed with ModelAdmin
filterable in the frontend

<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
#!/bin/bash
#Copyright 11.11.13 Michell Gailing <gailing.michell@gmail.com>
#It's Licensed under DWWWI 'Do whatever you want with it!'
wget http://www.okean.com/chinacidr.txt
sed -i '1,4d' chinacidr.txt
sed -i 's/ China//g' chinacidr.txt
ipset create china hash:net
while read line; do ipset add china $line; done < chinacidr.txt
iptables -I INPUT -m set --match-set china src -j DROP
rm chinacidr.txt