Skip to content

Instantly share code, notes, and snippets.

@oranheim
oranheim / gulp-4-gulpfile.js
Created October 20, 2018 12:43
Gulp with Bootstrap, Sass and browser sync
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
// Compile sass into CSS & auto-inject into browsers
gulp.task('sass', function() {
return gulp.src(['node_modules/bootstrap/scss/bootstrap.scss', 'scss/*.scss'])
.pipe(sass())
.pipe(gulp.dest("css"))
.pipe(browserSync.stream());
@oranheim
oranheim / shield-tv.log
Created May 1, 2016 10:15
Shield ATV SPMC v16.3.0 error loading subtitles
11:54:11 T:1394358576 DEBUG: New Service [service.subtitles.podnapisi]
11:54:11 T:1395423536 DEBUG: bool XFILE::CPluginDirectory::StartScript(const string&, bool) - calling plugin Podnapisi.net('plugin://service.subtitles.podnapisi/','1','?action=search&languages=English%2cNorwegian%20Bokm%c3%a5l&preferredlanguage=Norwegian%20Bokm%c3%a5l')
11:54:11 T:1395423536 DEBUG: bool XFILE::CPluginDirectory::WaitOnScriptResult(const string&, int, const string&, bool) - waiting on the Podnapisi.net (id=0) plugin...
11:54:11 T:1394358576 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
11:54:11 T:1442707760 DEBUG: Thread LanguageInvoker start, auto delete: false
11:54:11 T:1442707760 INFO: initializing python engine.
11:54:11 T:1394358576 DEBUG: SECTION:LoadDLL(libImageLib-arm.so)
11:54:11 T:1394358576 DEBUG: Loading: /data/app/com.semperpax.spmc16-2/lib/arm/libImageLib-arm.so
11:54:11 T:1442707760 DEBUG: CPythonInvoker(0, /storage/emulated/0/Android/data/com.semperpax.spmc16/files/.spmc/addons/serv
@oranheim
oranheim / docker-dns-console.txt
Last active March 7, 2016 20:01
Docker DNS with BIND
# From HOST the IP is correctly resolved 'mysql.example.com' with the correct address <===
ubuntu@docker:~$ host mysql.example.com 172.17.0.1
Using domain server:
Name: 172.17.0.1
Address: 172.17.0.1#53
Aliases:
mysql.example.com has address 172.17.0.10
// User model
@Exclude
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public class User extends Principal {
@Column(name = "USERNAME", nullable = false, length = 20)
public String getUsername() {
// Test case:
@Inject
@PartsRepository
EntityManager em;
@Inject
private ActiveEntityManagerHolder emHolder;
@Test
'use strict';
/**
* http://book.mixu.net/node/ch9.html
*
* Created by ora on 27.03.14.
*/
var SimpleEE = function () {
this.events = {};
'use strict';
/**
* Created by ora on 27.03.14.
*/
var eeService = require(__dirname + '/eeService.js'),
EventService = eeService.EventService;
describe('Test EventEmitter', function () {
'use strict';
/**
* Created by ora on 27.03.14.
*/
var EventEmitter = require('events').EventEmitter,
util = require('util');
var EventService = function () {
@oranheim
oranheim / nodejs-google.js
Last active August 29, 2015 13:56
Google Search example (works with node-phantom, but not with node-phantom-simple)
var doSearch, displayResults;
//var phantom = require('node-phantom');
var phantom = require('node-phantom-simple');
var assert = require('assert');
doSearch = function (ph, page) {
console.log("doSearch");
page.evaluate(function () {
$('input[name=q]').val('what is phantomjs');
$('form').trigger('submit');