Skip to content

Instantly share code, notes, and snippets.

View jrvaja's full-sized avatar

Jaimin Vaja jrvaja

  • Adjust GmbH
  • Berlin, Germany
View GitHub Profile
@jrvaja
jrvaja / blade-mixins.jade
Created April 5, 2016 07:15 — forked from JaminFarr/blade-mixins.pug
Laravel Blade mixins for jade for use with laravel-elixir-jade
//- For use with https://github.com/CREEATION/laravel-elixir-jade
mixin blade()
='\r\n'
block
='\r\n'
mixin phpblock()
!='\r\n<?php '
@jrvaja
jrvaja / READ ME
Created October 15, 2014 11:36
Ejabberd Config + Hook
Steps to set Ejabberd with Hook :
1. Install Ejabberd :
apt-get -y install ejabberd
2. Create Admin User of Ejabberd Panel :
ejabberdctl register admin localhost password
For our example we will call our admin user "admin@localhost" and modify the following lines in /etc/ejabberd/ejabberd.cfg:
<script type="text/javascript" src="/js/jquery.complexify.js"></script>
<script type="text/javascript">
$("#password").complexify(options, callback(valid, complexity){
alert("Password complexity: " + complexity);
});
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Extend · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
</head>
@jrvaja
jrvaja / SUBLIME TEXT2 INSTALLATION
Created July 22, 2012 08:46 — forked from devudilip/SUBLIME TEXT2 INSTALLATION
HOW TO INSTALL SUBLIME TEXT 2 ON UBUNTU 11.10
#BECOME SUPER USER#
sudo -i
#add sublime to repository#
add-apt-repository ppa:webupd8team/sublime-text-2
#update#
@jrvaja
jrvaja / PrintF-Sscanf
Created July 14, 2012 02:23
Jeff: PrintF-Sscanf
/*
printf
sprintf
sscanf
*/
// printf("This post was made on %s %s, %d", 'June', '7th', '2012');
//$posted = sprintf("This post was made on %s %s, %d", 'June', '7th', '2012');
@jrvaja
jrvaja / Sql_JOIN
Created July 6, 2012 08:16
SQL: JOIN
//Only returns columns from table1
SELECT table1 * from table1 INNER JOIN table2 on table1.id=table2.id;
//Returns all columns
SELECT * from table1 INNER JOIN table2 on table1.id=table2.id;
@jrvaja
jrvaja / CI_InsertData_Methods_model
Created July 4, 2012 16:19
CodeIgniter: CI_InsertData_Methods
/*
function getAll() {
$q = $this->db->query("SELECT * FROM data");
if($q->num_rows() > 0) {
foreach($q->result() as $row) {
$data[] = $row;
}
return $data;
}
}
@jrvaja
jrvaja / ci_Items
Created July 3, 2012 03:52
CodeIgniter:Items
/*************************************************************************
Loading a Config File
**************************************************************************/
/*----------------------------------
Manual Loading
----------------------------------*/
$this->config->load('filename');
/*************************************************************************
Fetching Config Items
**************************************************************************/
@jrvaja
jrvaja / view_functions
Created July 2, 2012 17:57
CodeIgniter: view_functions
<!-- ************************************************************************** -->
<!-- Load multiple Views -->
<!-- ************************************************************************** -->
<?php
class Page extends CI_Controller {
function index()
{
$data['page_title'] = 'Your title';