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
@ECHO ON | |
SET OUT_PATH=C:\nexus-backup\nexus_backup_%date:~4,2%%date:~7,2%%date:~10,4%.zip | |
SET NEXUS_BACKUP="C:\Program Files (x86)\Altium\Altium NEXUS Server\Tools\BackupTool\avbackup.exe" | |
@rem Backing up nexus server | |
%NEXUS_BACKUP% backup -z %OUT_PATH% |
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 node | |
const dynamoose = require('dynamoose'); | |
dynamoose.setDefaults({create: false }); | |
let schema = new dynamoose.Schema({ | |
key: { | |
type: String, | |
required: true, |
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 ports='python -m serial.tools.list_ports' | |
goofy() { | |
local logfile=~/Documents/serial-logs/two3-$1-$(date '+%F-%H:%M').log | |
echo "Logging $1@115200 to $logfile" | |
python -m serial.tools.miniterm $1 57600 -e --raw | tee $logfile | |
} | |
serial() { | |
local logfile=~/Documents/serial-logs/$1-$(date '+%F-%H:%M').log |
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
BEGIN; | |
INSERT INTO teams | |
(name, uuid) | |
VALUES | |
('inner-transaction', UNHEX(REPLACE(UUID(), '-',''))); | |
select * from teams; |
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
:: power shell only | |
:: chocolatey | |
Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
:: scoop | |
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') |
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 bash | |
EMAIL='[email protected]' | |
NAME='full name' | |
sudo apt install curl git | |
# Sublime | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list |
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
git branch --merged | egrep -v "(^\*|master|development)" | xargs 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 | |
# python 3 | |
from serial import Serial | |
import time | |
import argparse | |
from threading import Thread | |
class Command(): |
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'); | |
/* Load sample data */ | |
sample = require('./junk.sample.json'); | |
/* filter data down */ | |
filtered = sample.filter((x) => x.color == 'blue' && x.gain == 'high'); | |
/* save data to file */ | |
fs.appendFile('output', JSON.stringify(filtered)); |
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
struct external_interrupt_s; | |
typedef void (*external_callback_func)(struct external_interrupt_s *interrupt, GPIO_PinState state); | |
typedef struct external_interrupt_s | |
{ | |
GPIO_TypeDef *port; | |
uint32_t pin; | |
external_callback_func callback; |
NewerOlder