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
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_mixer.h> | |
#define WAV_PATH "Roland-GR-1-Trumpet-C5.wav" | |
#define MUS_PATH "HR2_Friska.ogg" | |
// Our wave file | |
Mix_Chunk *wave = NULL; | |
// Our music file | |
Mix_Music *music = NULL; |
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
perl -M'Digest::MD5 qw(md5_hex)' -e 'print md5_hex("`date +%d%m%y`")' |
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
########## SETTINGS | |
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands | |
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on. | |
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount | |
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g. | |
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g. | |
# 'sleep forever' or 'set dns:cache-expire never'. |
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
description "Stat HTTP server with aptly REST API" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
umask 022 | |
chdir / | |
setuid smartmatic | |
setgid smartmatic | |
console log # log stdout/stderr to /var/log/upstart/ |
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
#cd to your local openQA webui repository | |
#cd suse.com/github.com/os-autoinst/openQA | |
#If the setup for the development scenario involves sharing /var/lib/openqa, it would be wise to have a shared group openqa, that will have write and execute permissions over said directory, so that geekotest user and the normal development user can share the environment without problems. | |
# chmod -R g+rwx /var/lib/openqa/ | |
# chgrp -R openqa /var/lib/openqa can’t fix | |
#start the local (yours) webui | |
script/openqa gru -m production run & sleep 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
https://danielmiessler.com/study/tmux/#show -- Getting started | |
http://www.whiteboardcoder.com/2015/01/tmux-scripting.html -- some scripting | |
https://blog.htbaa.com/news/tmux-scripting -- https://github.com/maximos/maximus-web/blob/develop/tmuxgo.sh more scripting |
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
use strict; | |
use warnings; | |
use Benchmark::Stopwatch; | |
my $stopwatch = Benchmark::Stopwatch->new->start; | |
my $i = 0; | |
$stopwatch->lap("start"); | |
opendir(my $dh, ".") || die "Can't open dir : $!"; |
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
package PackageTesting::A; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
our @EXPORT = qw(a b); | |
sub whowasi { ( caller(2) )[3] } | |
sub a { | |
my ($called_from) = whowasi(); |
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
ssh-keygen -N '' -f .openqa-travis | |
travis.ruby2.2 --github-token ${YOURGHTOKEN} encrypt-file .openqa-travis | |
travis.ruby2.2 encrypt-file .openqa-travis | |
# add line on your .travis as requested | |
git add .openqa-travis.enc | |
echo .gitignore .openqa-travis >> .gitignore | |
cat .openqa-travis.pub # Add the new key to your deploy keys on github with write-access | |
git commit --amend .travis.yml .gitignore .openqa-travis.enc | |
# check https://docs.travis-ci.com/user/encryption-keys/ and https://github.com/jirutka/rake-jekyll for more info https://oncletom.io/2016/travis-ssh-deploy/ |
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
# This will work if you have still access to the partition | |
# and of course, you need root access for this :) | |
export firstpassword="This is the old password" | |
export new_password="This is the new password" | |
export loopdev=/dev/loop0 | |
export device=/tmp/$(date +%Y%M%d)-testdev.img | |
export volume_name=/dev/mapper/crypt_fun | |
dd if=/dev/zero of=testdev bs=1M count=500 | |
losetup $loopdev $device |
OlderNewer