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
public class Main { | |
public static void main(String[] args) { | |
SensorState s = SensorState.One; | |
s = s.run(); | |
s = s.run(); | |
} | |
} |
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 <signal.h> | |
#include <string.h> | |
void signalHandler(int sigNum) { | |
if (sigNum == SIGUSR1) { | |
// do stuff | |
} else if (sigNum == SIGUSR2) { | |
// do other stuff | |
} | |
} |
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
module hexagon(size, height) { | |
boxWidth = size/1.75; | |
for (r = [-60, 0, 60]) | |
rotate([0,0,r]) | |
cube([boxWidth, size, height], true); | |
} | |
module combs(x_count, y_count, hex_size, wall_size, height) { | |
function x_pos(x, y) = (hex_size + wall_size) * x + ((y % 2 == 0) ? 0 : (hex_size + wall_size) / 2); | |
function y_pos(x, y) = (hex_size) * y; |
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 requests | |
token = 'INSERT TOKEN HERE' | |
def list_repos(): | |
repos = requests.get( |
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
package main | |
import ( | |
"bufio" | |
"crypto/hmac" | |
"crypto/sha256" | |
"encoding/base64" | |
"log" | |
"net" | |
"strings" |
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 <stdint.h> | |
#include <sys/mman.h> | |
void func1(void) { | |
printf("func1\n"); | |
} | |
void func2(void) { | |
printf("func2\n"); |
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
module insert(xcount, ycount, hspacer=0, vspacer=0, feet=true, side=47.55, | |
height=23, wall=1, cornerradius=4) { | |
x_space = side * xcount + 2 * (xcount - 1); | |
y_space = side * ycount + 2 * (ycount - 1); | |
x_corner = [ | |
cornerradius, | |
x_space - cornerradius |
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
syn keyword asmRegRax %rax rax | |
syn keyword asmRegEax %eax eax | |
syn keyword asmRegAx %ax ax | |
syn keyword asmRegAh %ah ah | |
syn keyword asmRegAl %al al | |
syn keyword asmRegRbx %rbx rbx | |
syn keyword asmRegEbx %ebx ebx | |
syn keyword asmRegBx %bx bx | |
syn keyword asmRegBh %bh bh | |
syn keyword asmRegBl %bl bl |
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/bash | |
while true; do | |
x=$(date "+%s") | |
x=$(( $x % 360 )) | |
pi=`echo "4*a(1)" | bc -l` | |
xrad=`echo "$x*($pi/180)" | bc -l` | |
sinx=`echo "s($xrad)" | bc -l` | |
sinx2=`echo "- s($xrad)" | bc -l` | |
cosx=`echo "c($xrad)" | bc -l` |
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 <iostream> | |
using namespace std; | |
class A { | |
protected: | |
int count; |
OlderNewer