Skip to content

Instantly share code, notes, and snippets.

#https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-installation-server-setup.html
# 1. Install the tftp package. To do this, run the following command as root:
yum install tftp-server
# 2. In the /etc/xinetd.d/tftp configuration file, change the disabled parameter from yes to no.
# untested - inline find and replace
#sed -i.bak s/disable = yes/disable = no/g /etc/xinet.d/tftp
# 3. Allow incoming connections to the tftp service in the firewall:
c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.exec_lines.append('%autoreload 2')
// Enable prtinf/scanf/etc over uart
#include <stdio.h>
static FILE uart_stream = FDEV_SETUP_STREAM(uart_tx, uart_rx, _FDEV_SETUP_RW);
stdout = stdin = &uart_stream
@corburn
corburn / .bashrc
Last active February 9, 2021 16:07
Bash functions
# https://danielmiessler.com/blog/the-one-line-cli-bandwidth-test/
alias bt="wget http://cachefly.cachefly.net/100mb.test -O /dev/null"
# Watch nginx logs
alias access='tail -f /var/log/nginx/access.log'
alias error='tail -f /var/log/nginx/error.log'
# column is used here to display a Tab Separated Values file with vertically aligned columns
# less is used so the arrow keys can be used to scroll up/down left/right
tsv() {
@corburn
corburn / Makefile
Created November 25, 2015 21:23
SC15 Student Cluster Competition
# find ./ -type f -exec ldd {} \; 2>/dev/null | less
# LOCAL is the path prefix where the programs will be installed
# The environment variable will supersede the default value
#LOCAL ?= ${HOME}/local
SRC = ${CURDIR}
BIN = ${LOCAL}/bin
ifndef LOCAL
$(error LOCAL is not set)
endif
-- http://www.thedotpost.com/2015/11/francesc-campoy-flores-functional-go
-- https://youtu.be/ouyHp2nJl0I?t=85
quicksort [] = []
quicksort (x:xs) =
let smaller = quicksort [a | a <- xs, a <= x]
bigger = quicksort [a | a <- xs, a > x]
in smaller ++ [x] ++ bigger
{
"preset": "google",
"jsDoc": {
"checkAnnotations": "jsdoc3",
"checkParamExistence": true,
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
@corburn
corburn / CSP.md
Last active September 20, 2023 12:55 — forked from xrstf/letsencrypt.md
Nginx server notes

The following is from scotthelme.co.uk

Content Security Policy

with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), you can tell the browser that it can only download content from the domains you explicitly allow http://www.html5rocks.com/en/tutorials/security/content-security-policy/ https://www.owasp.org/index.php/Content_Security_Policy I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'

@corburn
corburn / UsingServiceWorkers.md
Last active April 27, 2016 15:28
Service Worker notes
  • HTTPS Required - Service Workers are restricted to running across HTTPS for security reasons.
  • Same Origin Required - Service workers must be from the same domain as for the page/app they are registered.
  • Beware Global Variables - A single service worker can control many pages. Each time a page within your scope is loaded, the service worker is installed against that page and operates on it. Bear in mind therefore that you need to be careful with global variables in the service worker script: each page doesn’t get its own unique worker.

Service worker functions like a proxy server, allowing you to modify requests and responses, replace them with items from its own cache, and more.

Events

@corburn
corburn / Makefile
Last active April 27, 2016 15:29
Install Ansible
.PHONY: ansible
ansible:
command -v ansible || make ${HOME}/workspace/src/github.com/ansible/ansible/build
.PHONY: ansible-build-dependencies
ansible-build-dependencies: enable-epel
yum update \
&& yum -y groupinstall "Development tools" \
&& yum -y install python-{pip,setuptools,devel}