This file contains 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 | |
site="https://menu.lolev.beer" | |
previous=`cat checksum` | |
current=`curl -s $site | md5sum` | |
echo "$current" > checksum | |
echo "Previous contents of page: $previous" | |
echo "Current contents of page: $current" |
This file contains 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
SELECT | |
TABLE_NAME AS `Table`, | |
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` | |
FROM | |
information_schema.TABLES | |
WHERE | |
TABLE_SCHEMA = "db" | |
ORDER BY | |
(DATA_LENGTH + INDEX_LENGTH) | |
DESC; |
This file contains 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
const fs = require('fs'); | |
const content = fs.readFileSync('./data.csv', 'utf8'); | |
const messages = content | |
.split('\n') | |
.map(line => line.trim()) | |
.filter(line => line.length > 0 && line !== 'time,addr,bus,data') | |
.map(line => line.split(',')) | |
.map(msg => ({ | |
addr: parseInt(msg[1]), |
This file contains 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
[alias] | |
a = add | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" |
This file contains 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 sys | |
import time | |
import struct | |
from panda import Panda | |
DEBUG = False | |
def main(): | |
logfile = sys.argv[1] |
This file contains 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 | |
# Help menu | |
print_help() { | |
cat <<-HELP | |
This script is used to fix permissions of a Drupal installation | |
you need to provide the following arguments: | |
1) Path to your Drupal installation. | |
2) Username of the user that you want to give files/directories ownership. |
This file contains 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 | |
from evdev import InputDevice | |
from select import select | |
import time | |
import numpy as np | |
import zmq | |
from cereal import car | |
import selfdrive.messaging as messaging |
This file contains 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
const fs = require('fs'); | |
const content = fs.readFileSync('./data.csv', 'utf8'); | |
const data = content.trim() | |
.split('\n') | |
.filter(l => l) | |
.map(l => l.split(',')) | |
.map(row => ({ time: row[0], id: `${row[2]}:${row[1]}`, message: row[3] })) | |
const ids = {}; |
This file contains 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
// added this at the end of CAN_RX() | |
// make a copy | |
CAN_FIFOMailBox_TypeDef tx_to_push; | |
tx_to_push.RDHR = to_push.RDHR; | |
tx_to_push.RDLR = to_push.RDLR; | |
tx_to_push.RDTR = to_push.RDTR; | |
tx_to_push.RIR = to_push.RIR; | |
int flags = (tx_to_push.RDTR >> 4) & 0xF; |
This file contains 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
wget -m ftp://username:password@ip:21 |
NewerOlder