This file contains hidden or 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 "LedControl.h" | |
| LedControl lc = LedControl(7, 6, 5, 1); | |
| void setup() { | |
| lc.shutdown(0, false); | |
| lc.clearDisplay(0); | |
| lc.setIntensity(0, 15); | |
| } | |
| void printDashes() { |
This file contains hidden or 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 <stdio.h> | |
| #include <pcap.h> | |
| #include <stdlib.h> | |
| #include <iostream> | |
| #include <algorithm> | |
| #include <netinet/ip.h> | |
| #include <arpa/inet.h> | |
| #include <netinet/if_ether.h> | |
| #include <string> | |
| #include <sstream> |
This file contains hidden or 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
| import json | |
| def main(): | |
| contents = open('json_data_raw.json').read() | |
| response = json.loads(contents) | |
| items = {k.replace('-','').replace(':','').lower():v for k, v in response.iteritems()} | |
| short_macs = filter(lambda x: len(x[0]) == 6, items.iteritems()) | |
| long_macs = filter(lambda x: len(x[0]) == 10, items.iteritems()) |
This file contains hidden or 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
| #! /bin/sh | |
| python -c 'import uuid; print uuid.uuid4()' |
This file contains hidden or 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
| var Table = require("./table"); | |
| var async = require('asyncawait/async'); | |
| var await = require('asyncawait/await'); | |
| async(function () { | |
| var table = Table({}); | |
| var index = 123; | |
| var row = await(table.row(index)); |
This file contains hidden or 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 <SPI.h> | |
| #include <Ethernet.h> | |
| byte mac[] = { 0x4E, 0xFB, 0xDD, 0x13, 0x06, 0x28 }; | |
| IPAddress ip(10, 0, 0, 50); | |
| byte server[] = { 10, 0, 0, 17 }; | |
| EthernetClient client; | |
| void setup() | |
| { |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import subprocess | |
| import sys | |
| import re | |
| import os | |
| def get_pids(port): | |
| command = "sudo lsof -i :%s | awk '{print $2}'" % port | |
| pids = subprocess.check_output(command, shell=True) |
This file contains hidden or 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
| #!/usr/bin/python | |
| import requests | |
| import re | |
| url = 'https://api.github.com/repos/<username>/<repo name>/issues' | |
| args = { | |
| 'access_token': '<Your Access Token Here>', | |
| 'state': 'open', | |
| 'per_page': 1 |
This file contains hidden or 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
| from abc import ABCMeta, abstractmethod | |
| import inspect | |
| class BaseEnum(object): | |
| __metaclass__ = ABCMeta | |
| def __init__(self): | |
| self._names = dict() | |
| self._names_reversed = dict() |