Skip to content

Instantly share code, notes, and snippets.

@jsc-dev
jsc-dev / druckversion.html
Created March 10, 2015 19:07
druckversion
<a href="#" class="btn" onclick="PrintContent()"><i class="icon-print icon-white"></i> drucken</a>
<script type="text/javascript">
function PrintContent()
{
var DocumentContainer = document.getElementById('printable');
var WindowObject = window.open("", "PrintWindow","width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
WindowObject.document.writeln('<link rel="stylesheet" type="text/css" href="/css/bootstrap3.2.0.min.css" media="all" />');
WindowObject.document.writeln('<link rel="stylesheet" type="text/css" href="/css/override.css" media="all" />');
WindowObject.document.writeln('<link rel="stylesheet" type="text/css" href="/css/print.css" media="all" />');
module.exports = function(grunt) {
/*
* install grunt global:
* $ npm install -g grunt-cli
*
* install dependencies from package.json (must run in project dir!)
* $ npm install
*/
@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
<?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 / 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
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();
#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
<!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 {
# 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>
#!/usr/bin/env bash
# Configurable variables
database='vagrant'
username='vagrant'
password='vagrant'
echo ''
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4'