Skip to content

Instantly share code, notes, and snippets.

View markogresak's full-sized avatar

Marko Grešak markogresak

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct seznamBesed {
char **vrstice;
int stVrstic;
}; typedef struct seznamBesed* sBesed;
sBesed initSeznam(sBesed);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <ctype.h>
//----------------struct za linked list-------------
struct node {
char *vpisna;
#!/bin/bash
# Generate Rdeca Kapica's public/private key pair into private keystore
echo "Generating Rdeca Kapica's public private key pair"
keytool -genkey -alias rkprivate -keystore rk.private -storetype JKS -keyalg rsa -dname "CN=Rdeca Kapica" -storepass rkpwd1 -keypass rkpwd1 -validity 365
# Generate Babica's public/private key pair into private keystore
echo "Generating Babica's public private key pair"
keytool -genkey -alias babicaprivate -keystore babica.private -storetype JKS -keyalg rsa -dname "CN=Babica" -storepass babicapwd -keypass babicapwd -validity 365
// izpiti komplet 1/5 - naloga 2.
#include <stdio.h>
#include <stdlib.h>
#define ST_ELEMENTOV 10
typedef struct node {
int value;
struct node *next;
} node;
// izpiti komplet 1/5 - naloga 2.
#include <stdio.h>
#include <stdlib.h>
#define ST_ELEMENTOV 10
typedef struct node {
int value;
struct node *next;
} node;
#!/bin/sh
sudo lsof -i | grep :35729 | awk '{print $2}' | xargs kill
@markogresak
markogresak / dotjs.sh
Created August 8, 2014 01:13
Shell script for use with https://github.com/defunkt/dotjs. Allows easy add/edit via terminal.
# print help | accepts exit code arg, defaults to 0
function help {
ec=$1
if test $# -eq 0; then
ec=0
fi
printf "================================================================================\n"
printf "================================= dotjs helper =================================\n"
printf "================================================================================\n"
printf "Creates ~/.js file or uses existing and opens it\n\n"
.
├── LICENSE
├── app
├── components
│   ├── coffee
│   ├── gulp
│   │   ├── tasks
│   │   └── util
│   └── js
│   ├── dev
@markogresak
markogresak / socket.io-emit-broadcast-usage.js
Created November 1, 2014 03:56
Different destination groups for socket.io emit and broadcast functions
// send to current request socket client
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.sockets.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender