Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
apt-get update
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections
apt-get install -y mysql-common mysql-server mysql-client
apt-get install -y apache2
## This is a directory/file filter template for WinMerge
name: JSC_WinMerge_Filter
desc: filter for svn, git, vagrant and eclipse
## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include
#!/usr/bin/env bash
# Configurable variables
database='vagrant'
username='vagrant'
password='vagrant'
echo ''
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4'
# Apache:
# Set up http://mydomain.com/data to route to NodeJS at port 3000 on the same machine.
#
# Do this in your .conf file:
<Location /data>
ProxyPassReverse http://localhost:3000/data
ProxyPass http://localhost:3000/data
</Location>
<!doctype html>
<html ng-app="project">
<head>
<title>Angular: Service example</title>
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script>
var projectModule = angular.module('project',[]);
projectModule.factory('theService', function() {
return {
#create db
mysql -uroot --password -e "CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci"
#import db
mysql --user=root --password -h localhost dbname < /db.sql
#import gzipped db
zcat db.sql.gz | mysql --user=root --password -h localhost dbname
#dumb db
<?php
class helper {
/**
* @param mixed $obj
* @return array $obj
*/
public static function getArray($obj) {
if (is_array($obj)) return $obj;
if ($obj != null) return array($obj);
else return array();
@jsc-dev
jsc-dev / bootstrap-override3.1.css
Created November 30, 2014 14:24
custom b3 override boilerplate
/*
* Bootstrap Custom Styles
*
*/
body {
background-color: #fff;
color: #000;
/*font-size: 15px;
line-height: 1.45857;*/
<?php
// demo soap client 4 wsdl2php gen
// http://php.net/manual/de/soapclient.getlastresponseheaders.php
// http://php.net/manual/de/class.soapclient.php
ini_set("soap.wsdl_cache_enabled", "0");
include 'demo.php';
$client = new demo("demo.wsdl",array('location' => "http://www.example.com/webservices/", 'uri' => "http://www.example.com/webservices/", 'trace' => true));
@jsc-dev
jsc-dev / gist:cbc630c52a7d3e42f7e9
Created February 2, 2015 23:02
copy local file to emote target by scp
#copy local file to a remote target by scp
scp /home/user/sourcefolder\file.name user@192.168.178.1:/home/user/targetfolder