Skip to content

Instantly share code, notes, and snippets.

View nepda's full-sized avatar

Nepomuk Pajonk nepda

View GitHub Profile
#!/bin/sh
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
for d in /etc/letsencrypt/live/*; do
domain=`basename $d`
if openssl x509 -checkend 86400 -noout -in $d/cert.pem
@nepda
nepda / hypermash.desktop
Created June 17, 2016 10:05
~/Desktop/hypermash.desktop
[Desktop Entry]
Type=Application # Indicates the type as listed above
Version=1.0 # The version of the desktop entry specification to which this file complies
Name=Hypermash # The name of the application
Comment=ALTAIR Hypermash # A comment which can/will be used as a tooltip
Path=/opt/altair/hyperworks/altair/scripts/ # The path to the folder in which the executable is run
Exec=export ALTAIR_LICENSE_PATH=6200@lm-altair.hrz.tu-chemnitz.de && sh ./hm # The executable of the application.
Icon=test # The name of the icon that will be used to display this entry
Terminal=false # Describes whether this application needs to be run in a terminal or not
@nepda
nepda / not-working-websocket-example.php
Created January 27, 2016 17:26
Not working WebSocket example with AMQP
<?php
require_once 'vendor/autoload.php';
use Thruway\Peer\Router;
use Thruway\Transport\RatchetTransportProvider;
use PhpAmqpLib\Connection\AMQPStreamConnection;
$realm = 'realm1';
#include <stdio.h>
#include <mpi.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char **argv) {
MPI_Init(&argc, &argv);
#include <stdio.h>
#define nodeSize 18
struct Graph {
int AdjMatrix[nodeSize][nodeSize];
};
void printGraph(int Graph[nodeSize][nodeSize])
<?php
namespace App {
include_once '../vendor/autoload.php';
}
namespace App\Entity {
use Zend\Form\Annotation;
@nepda
nepda / Geometry.hs
Last active August 29, 2015 14:14
pi-hps-ws1415.hs
module Geometry
( sphereVolume
, sphereArea
, cubeVolume
, cubeArea
, cuboidArea
, cuboidVolume
) where
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
int main(int argc, char** argv) {
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <wait.h>
int main(int argc, char** argv) {
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <wait.h>
int main(int argc, char** argv) {
pid_t cpid;
int fd[2],