This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* css hover version of .dropdown */ | |
.dropdown-hover { | |
.dropdown (); | |
&:hover { | |
> .dropdown-menu { | |
display: block; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('HTTP/Request2.php'); // sudo pear install HTTP_Request2 | |
require( __DIR__ . '/vendor/wisembly/elephant.io/lib/ElephantIO/Client.php'); | |
use ElephantIO\Client as ElephantIOClient; // sudo apt-get install php5-curl | |
function get_cookie($request) { | |
$request->setMethod( HTTP_Request2::METHOD_GET); | |
$request->setCookieJar(true); | |
try { | |
$response = $request->send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <NameOfYourModel>Controller | |
* | |
* @module :: Controller | |
* @description :: A set of functions called `actions`. | |
* | |
* Actions contain code telling Sails how to respond to a certain type of request. | |
* (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL) | |
* | |
* You can configure the blueprint URLs which trigger these actions (`config/controllers.js`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generates one json-file including all languages in all translations using https://github.com/staser | |
var fs = require('fs'); | |
var langDir = __dirname+"/git/country-list/country/cldr"; | |
var dest = __dirname+"/langs.json"; | |
var languages = {}; | |
fs.readdir(langDir, function(err, list) { | |
console.log(err); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DBus = require('dbus'); | |
var dbus = new DBus(); | |
var util = require('util'); | |
var inspect = function(object) { | |
console.log("\n"+util.inspect(object, showHidden=false, depth=2, colorize=true)+"\n"); | |
} | |
var bus = dbus.getBus('system'); | |
var serviceName = 'org.freedesktop.NetworkManager'; | |
var objectPath = '/org/freedesktop/NetworkManager/Settings/0'; // replace the number 0 this with your settings you want to test, you can use d-feet to pick up the right | |
var interfaceName = 'org.freedesktop.NetworkManager.Settings.Connection'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* rewritten bootstrap 3 responsive timeline css for less | |
* source: http://bootsnipp.com/snippets/featured/timeline-responsive | |
*/ | |
.timeline { | |
list-style: none; | |
padding: 20px 0 20px; | |
position: relative; | |
&:before { | |
top: 0; | |
bottom: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example code for this tutorial: https://jumplink.eu/blog/post/serveranwendung-direkt-typescript-entwickeln-und-testen | |
import 'mocha'; | |
import ChaiHttp = require('chai-http'); | |
import * as chai from 'chai'; | |
chai.use(ChaiHttp); | |
describe('test route', function() { | |
it('should response with status 200', function(done) { |