Skip to content

Instantly share code, notes, and snippets.

View Tjoosten's full-sized avatar
🌏
Somewhere between home and Hogwarts School of Witchcraft and Wizardry

Tim Joosten Tjoosten

🌏
Somewhere between home and Hogwarts School of Witchcraft and Wizardry
  • Polar Youth
  • Antwerp, BE
  • 07:51 (UTC +02:00)
  • X @x0rif
View GitHub Profile
<?php
// ______________________
// / \
// | WARNING: |
// | Here will be dragons |
// \___ _________________/
// |/
// (o_
// //\
<script type="text/javascript">
function Dropdown(eenheid,regimenten) {
var A.B.L = <?php json_encode($Regimenten_ABL); ?>
switch (eenheid.value) {
case 'A.B.L':
regimenten.options.length = 0;
for (i = 0; i < colours.length; i++) {
createOption(regimenten, A.B.L[i], A.B.L[i]);
}
@Tjoosten
Tjoosten / gist:1254c03284ab530c6119
Created December 9, 2014 10:25
migration_laravel.php
<?php
ini_set('display_errors',0);
require_once('Spinternet/Api.php');
//try {
$spinternet = Spinternet_Api::getInstance();
$mm = $spinternet->getMemberManagement('jorisp@spinternet.be','sn1145', 'sn1145tAjgcNFWvMBDR48P9IhncE40uUsD6h', false);
// error = Cannot GET /api/Bears
// Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'newuser'@'127.0.0.1' (using password: YES)
// Server.js
// BASE SETUP
// =======================================================================================
// Call the packages we need
var express = require('express'); // call express
@Tjoosten
Tjoosten / gist:6bd491ada94bb5313849
Last active August 29, 2015 14:11
image upload laravel
$file = Input::file('file');
$destinationPath = 'uploads';
// If the uploads fail due to file system, you can try doing public_path().'/uploads'
$filename = str_random(12);
//$filename = $file->getClientOriginalName();
//$extension =$file->getClientOriginalExtension();
$upload_success = Input::file('file')->move($destinationPath, $filename);
if( $upload_success ) {
return Response::json('success', 200);
if($this->Auth) {
$config['allowed_types'] = 'jpg';
$config['upload_path'] = './assets/Fotos';
$this->load->library('upload', $config);
if (!$this->upload->do_upload()) {
$error = array('error' => $this->upload->display_errors());
var_dump($error);
} else {
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->helper('file');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
require(APPPATH'./includes/Table.php');
class Statistics extends CI_Controller {
function __construct() {
parent::__construct();
// Controller can only be called from the command line.
if(!$this->input->is_cli_request()) show_error('Direct access is not allowed');
// Database Layers
function Columns() {
// Load variables
$Regiment = $this->Regimenten->Regimenten_All();
$Begraafplaats = $this->Begraafplaatsen->Get_all();
$Burgers = $this->Burgers->Doden();
$Correctie = $this->Correcties->Get_all();
$Vrijwilligers = $this->User->Get_users();
$Soldaten = $this->Soldaten->Select();
$query = $$this->db->list_fields('users');

Floats and clearing

If you float it, you probably need to clear it. Any content that follows an element with a float will wrap around that element until cleared. To clear floats, use one of the following techniques.

Use the micro clearfix to clear your floats with a separate class.

.clearfix:before,
.clearfix:after {
 display: table;