systemctl set-default multi-user.target
systemctl get-default # shows new default mode
reboot
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
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
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
.tree-view { | |
background-image: url(""); | |
li.directory { | |
.header { | |
.icon:before { | |
color: #337ab7; | |
} | |
} |
Windows XP will not automatically connect to the internet. To set up internet connection via Airport:
- Shut down VirtualBox and reopen
- Navigate to Settings > Network and set these options:
- Attached to: Bridged Adapter
- Name: en1: Airport
- Advanced > Adapter Type: PCnet-Fast 111 (Am79C973). All other settings at default.
- Restarting VirtualBox may be necessary.
randomFileW=$(identify -format "%w\n"
maxWidth=$(identify -format "%w\n" dir/* | sort -n -r | head -n 1) maxHeight=$(identify -format "%h\n" dir/* | sort -n -r | head -n 1)
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
<table id="frontpage_categories_new"> | |
<tr> | |
{$cols=3} | |
{foreach $module_content as $module_data} | |
<td style="width:300px;"> | |
<a href="{$module_data.categories_link}"> | |
<img src="{$smarty.const.DIR_WS_IMAGES}categories/{$module_data.categories_image}"> | |
{$module_data.categories_name} | {$smarty.foreach.foo.iteration neq 1 AND $smarty.foreach.foo.iteration is div by 3} | |
</a> | |
</td> |
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
// SVG.Text with added functionality of measing the pixel width server side using NODE. | |
// | |
// Depends mainly on 'svg.js' and 'string-pixel-width'. | |
// 'Check string-pixel-width' on npmjs.org for supported fonts. | |
// | |
// COMPLETE EXAMPLE | |
// | |
// const window = require('svgdom'); | |
// const SVG = require('svg.js')(window); | |
// const document = window.document; |
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
#!/bin/bash | |
# Requires http://mp3wrap.sourceforge.net/ | |
# Require rename | |
# Correct sorting for me, NOT: 1, 10, 11, 2 ,... | |
# Names the MP3 to current directory name | |
# Replaces whitespace in file and folder names by single underscore | |
# This script is usefull if your direcorie names are like: VCD_2019_7_26_(1), VCD_2019_7_26_(2), ... |
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
npm install -g @angular/cli | |
ng new new-project | |
cd new-project | |
npm install firebase @angular/fire bootstrap jquery --save | |
# Set DB: Firestore | |
# Set public directory: dist/new-project | |
firebase init | |
# firebase deploy should trigger a production build. |
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
// ./src/app/functionstest/functionstest.tl | |
import { Component, OnInit } from '@angular/core'; | |
import { AngularFireFunctions } from '@angular/fire/functions'; | |
@Component({ | |
selector: 'app-functiontest', | |
template:'<p style="border:1px red solid;margin-top:50px">{{ out }}x</p>' | |
}) | |
export class FunctiontestComponent implements OnInit { |
OlderNewer