Skip to content

Instantly share code, notes, and snippets.

View mosbth's full-sized avatar

Mikael Roos mosbth

View GitHub Profile
@mosbth
mosbth / hello.py
Created August 25, 2015 12:18
Hello World in Python
#!/usr/bin/env python3
"""
Some various ways of saying Hello World in Python
"""
def hello():
"""
Print out Hello World in a function.
"""
print("Hello World in a function.")
@mosbth
mosbth / capture.sh
Created May 16, 2014 11:50
Debian/Linux command-line script to capture screen, webcam and audio into three separate streams using ffmpeg and post edit them in Openshot which also renders the final movie.
#!/bin/bash
#Settingb for cam
#v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=1
v4l2-ctl --get-fmt-video
#v4l2-ctl --set-parm=30
v4l2-ctl --get-parm
# Settings for mic
amixer -c 2 set Mic 32
@mosbth
mosbth / log.txt
Created September 5, 2023 11:32
Log felsökning
From github.com:dbwebb-se/website
e02c910e..bdda2503 master -> origin/master
Updating e02c910e..bdda2503
Fast-forward
content/kunskap/115_installera-en-egen-webbserver-for-utveckling.md | 9 +++-
content/kunskap/1221_skapa-en-webbsida-med-html-css-och-php-v2.md | 4 +-
content/kunskap/218_installera-python-i-terminalen.md | 13 ++++++
content/kurser/databas-v2/kmom10/tentamen/sapo3.md | 221 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
content/kurser/faq/introduktionsveckan-2023.md | 29 ++++++++----
content/kurser/python-v5/kmom01.md | 5 +--
@mosbth
mosbth / config.php
Created September 5, 2023 08:19
PHP Config
<?php
// Report all type of errors
error_reporting(-1);
// Display all errors
ini_set('display_errors', '1');
@mosbth
mosbth / catalysts.md
Last active January 12, 2023 22:06
From a cached version of http://freenode.net/catalysts.shtml since their website is currently down.

Catalysts

The "catalyst" role is critical to freenode and an essential building block of channels. No one is required to be a catalyst, but the users who perform this role ensure the smooth and efficient functioning of the network.

IRC does not automatically produce a stable culture of cooperative effort. Even in cases where cooperation is intended, misunderstandings and personality incompatibilities can result in an extremely chaotic and hostile environment. Catalysts help prevent and resolve misunderstanding, calm the waters when users have difficulties dealing with each other and provide examples of constructive behavior in environments where such behavior might not otherwise be the norm.

Catalysts try to resolve problems, not through the use of authority and special privilege, but by fostering consensus, gently nudging participants in the direction of more appropriate behavior and by generally reducing the level of confrontation rather than confronting users with problems.

@mosbth
mosbth / kmom04.php
Created September 20, 2022 12:18
kmom04 zoom timme 1
<pre>
<?php
include('../config/config.php');
$mikael = [
"name" => "Mikael",
"age" => 42,
"luckynumber" => 3.14,
];
>>> -------------- Start -------------------------
mosstud/mvc/kmom10 Thu May 20 13:51:55 CEST 2021
>>> -------------- 012_is-git-repo.bash -------------------------
OK 012_is-git-repo.bash
>>> -------------- 014_check-repo-remote.bash -------------------------
OK 014_check-repo-remote.bash
>>> -------------- 020_git-tag-exists.bash -------------------------
main.c:34:10: warning: declaration does not declare anything
};
^
main.c: In function ‘meny’:
main.c:58:14: warning: implicit declaration of function ‘isDigit’ [-Wimplicit-function-declaration]
choice = isDigit();
^~~~~~~
main.c:61:16: warning: unknown escape sequence: '\P'
printf("\Please enter patient info \n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:20:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
sayHi(){
^~~~~
main.c: In function ‘sayHi’:
main.c:26:10: warning: passing argument 1 of ‘puts’ from incompatible pointer type [-Wincompatible-pointer-types]
puts(name);}
^~~~
In file included from main.c:1:
/usr/include/stdio.h:638:30: note: expected ‘const char *’ but argument is of type ‘char **’
extern int puts (const char *__s);
main.c: In function ‘main’:
main.c:23:9: warning: implicit declaration of function ‘printMainMenu’ [-Wimplicit-function-declaration]
printMainMenu();
^~~~~~~~~~~~~
main.c:27:13: warning: implicit declaration of function ‘printSubMenu’ [-Wimplicit-function-declaration]
printSubMenu();
^~~~~~~~~~~~
main.c:33:17: warning: implicit declaration of function ‘handlePractice’ [-Wimplicit-function-declaration]
handlePractice(choice); //Call function if valid choice
^~~~~~~~~~~~~~