Skip to content

Instantly share code, notes, and snippets.

View bezborodow's full-sized avatar

Damien Bezborodov bezborodow

View GitHub Profile
@bezborodow
bezborodow / sdr.md
Last active October 31, 2024 07:37
Software-defined Radio (SDR) Lectures and Tutorials
@bezborodow
bezborodow / Matlab RLC Bandpass
Created December 1, 2020 14:25
Matlab RLC Bandpass
fr = @(l, c) 1 / (2 * pi * sqrt(l*c) );
xl = @(l, c) 2 * pi * fr(l, c) * l;
xc = @(l, c) 1 / (2 * pi * fr(l, c) * c);
q = @(l, c, r) r / xl(l, c);
bw = @(l, c, r) fr(l, c) / q(l, c, r);
@bezborodow
bezborodow / Adapter.php
Last active March 23, 2024 04:52
MySQLi to PDO Shim
<?php
namespace MySQLi\PDO\Adapter;
use PDO;
use PDOStatement;
class Connection
{
public $affected_rows;
@bezborodow
bezborodow / Makefile
Last active September 2, 2019 03:58
Laravel Build Makefile
WWW ?= /var/www
WWW_USER ?= apache
WWW_GROUP ?= wheel
js_assets = public/js/app.js
css_assets = public/css/app.css
assets = $(js_assets) $(css_assets)
css_deps = $(shell find resources/assets/sass/ -name '*.css' -o -name '*.scss')
js_deps = $(shell find resources/assets/js/ -name '*.js' -o -name '*.vue')
rsync_src = vendor storage config app public resources bootstrap routes artisan composer.*
<template>
<select ref="select">
<option v-if="!this.value"></option>
</select>
</template>
<script>
export default {
props: ['options', 'url', 'placeholder', 'allow_clear', 'label', 'value'],
@bezborodow
bezborodow / byte_multiples.html
Last active October 7, 2016 04:59
Bytes Multiple Unit Calculator
<!--
Requires Bootstrap and jQuery.
-->
<script type="text/javascript">
$(function() {
$('.calc-input').change(function() {
$('#calc-output').val(parseInt($('#calc-quantity').val()) * parseInt($('#calc-prefix').val()));
}).trigger('change');
});
@bezborodow
bezborodow / .bashrc
Last active October 16, 2024 07:28
Damo's UNIX Development Environment Preferences
# Bash prompt with colour-coded exit status
PS1="\e[0;36m\]\h \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`"
# Or for local machine:
# PS1="\e[0;46m\]\h\e[00m\] \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`";
# Ctags
alias rbtags='ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)'
alias pytags='ctags -R --languages=python'
# Git shortcuts