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> | |
#include <GL/glut.h> | |
#include <vector> | |
#include <math.h> | |
using namespace std; | |
#define center 0 | |
// Point class with x and y | |
class Point{ | |
public: | |
int x,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
commands | |
-------- | |
wifi-menu #connect to net | |
ext4 home, root | |
fat32 boot | |
swap swap | |
mount /dev/sdxY /mnt | |
mkdir -p /mnt/boot | |
mount /dev/sdxY /mnt/boot |
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
// polygon Clipping using Sutherland-Hodgeman Algorithm | |
#include <GL/glut.h> | |
#include <stdio.h> | |
#include <iostream> | |
#include <stdlib.h> | |
#include <list> | |
using namespace std; | |
float xmin=220; | |
float ymin=220; | |
float xmax=420; |
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
# In google chrome, install cookies.txt addon, download browser cookies with it to download folder | |
activity="Motorcycling" | |
# create csv file if not exist | |
if [ ! -f ~/mileage.csv ]; then | |
/usr/bin/echo "date,distance,=sum(b:b)/1000" > ~/mileage.csv | |
startDate=`date +%Y-%m-%d -d "1 day ago"` | |
else | |
startDate=$(/usr/bin/cat ~/mileage.csv | /usr/bin/tail -n1 | /usr/bin/cut -f1 -d,) | |
startDate=$(date -I -d "$startDate +1 day") |
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
; Read the two 16bit numbers | |
; x=r3r2 | |
; y=r1r0 | |
movx a,@dptr | |
mov r3,a | |
inc dptr | |
movx a,@dptr | |
mov r2,a | |
inc dptr | |
movx a,@dptr |
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
; 8051 serial communication | |
; ------------------------- | |
; Serial Controller, SCON register | |
; 7 SM0 9Fh Serial port mode bit 0 | |
; 6 SM1 9Eh Serial port mode bit 1. | |
; 5 SM2 9Dh Mutliprocessor Communications Enable (explained later) | |
; 4 REN 9Ch Receiver Enable. This bit must be set in order to receive characters. | |
; 3 TB8 9Bh Transmit bit 8. The 9th bit to transmit in mode 2 and 3. |
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> | |
/*Socket obviously required*/ | |
#include <sys/socket.h> | |
/*Any shit ending with _t is prolly from this library*/ | |
#include <sys/types.h> | |
#include <string> | |
#include "string.h" | |
#include "unistd.h" | |
#include "netinet/in.h" | |
#define defPort 142536 |
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
;read size of first matrix into r0,r1 | |
movx a,@dptr | |
mov r0,a | |
inc dptr | |
movx a,@dptr | |
mov r1,a | |
inc dptr | |
;move start of matrix to r2 | |
mov r2,dpl |
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
;bsearch | |
;read num to search into r1 | |
movx a,@dptr | |
inc dptr | |
mov r1,a | |
;read final element pos into r2 | |
movx a,@dptr | |
subb a,#1 | |
mov r2,a | |
mov r3,#0 |
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
Copy and paste to relevant files in the same path as speed.json | |
run ./view.sh |