Skip to content

Instantly share code, notes, and snippets.

View metrafonic's full-sized avatar
🌴
On vacation

Mathias metrafonic

🌴
On vacation
View GitHub Profile
@metrafonic
metrafonic / hangman.c
Created December 11, 2014 08:02
leshangman
int lesHangmanOrd(){
char tempOrd[30];
int i=0;
FILE * ordFil = NULL;
ordFil=fopen("Hangman.txt", "r");
do{
fscanf(ordFil, "%s", tempOrd);
strcpy(hangmanOrd[i], tempOrd);
i++;
}while(!feof(ordFil) && i<N);
@metrafonic
metrafonic / gist:039ddd1b33819dcec073
Created February 18, 2015 07:17
Make gradlew executable
git update-index --chmod=+x gradlew
@metrafonic
metrafonic / gist:469d102cc2a073029ad0
Created February 18, 2015 15:54
plexconnect nginx
server {
server_name trailers.apple.com atv.plexconnect;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://metrafonic.com:88;
}
@metrafonic
metrafonic / main.c
Created May 28, 2015 10:58
TX UART
#include <avr/io.h>
#include"ButtonPress.h"
int main(void)
{
DDRB |= 1 << PINB1;
DDRB &= ~(1 << PINB0);
PORTB |= 1 << PINB0;
int UBBRValue = 25;
@metrafonic
metrafonic / ButtonPress.h
Created May 28, 2015 17:29
ButtonPress.h
#ifndef ButtonPress
#define ButtonPress
#include <avr/io.h>
char ButtonPressed(int buttonNumber, unsigned char pinOfButton, unsigned char portBit, int confidenceLevel);
char Pressed[2];
int Pressed_Confidence_Level[2]; //Measure button press cofidence
int Released_Confidence_Level[2]; //Measure button release confidence
@metrafonic
metrafonic / index.hbs
Last active August 29, 2015 14:22
gist
{{#foreach posts}}
<article class="{{post_class}}" itemscope itemtype="http://schema.org/BlogPosting" role="article">
<div class="article-item">
<header class="post-header">
<h2 class="post-title" itemprop="name"><a href="{{url}}" itemprop="url">{{{title}}}</a></h2>
<span class="post-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}} {{tags prefix="on "}}</span>
</header>
<section class="post-excerpt" itemprop="description">
<p>{{excerpt characters="250"}}…</p>
@metrafonic
metrafonic / cisco-cheatsheet.md
Last active August 29, 2015 14:23
CISCO Cheatsheet

Basic Configuration w Auth:

Change Hostname:

> enable
# configure terminal
(config)# hostname nyhostname
(config)# exit

Enable Secret:

Keybase proof

I hereby claim:

  • I am metrafonic on github.
  • I am metrafonic (https://keybase.io/metrafonic) on keybase.
  • I have a public key ASCIrot8H9uXXB-SR-yNv7AacqmTx0QNO5sma6w961KmrAo

To claim this, I am signing this object:

@metrafonic
metrafonic / openpgp.txt
Created April 3, 2016 15:01
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:6a32a2945304076b649d4bb6d901e8e7fcc05cd2]
@metrafonic
metrafonic / arguments.py
Created April 7, 2016 13:29
Python arguments with usage example
#!/usr/bin/python
import sys
import getopt
def usage():
print "usage: arguments [OPTION] [-c num | -s str]"
print "Options:"
print "\t-h, --help\tShow help"
def calculateNum(arg):