Skip to content

Instantly share code, notes, and snippets.

View thatbudakguy's full-sized avatar

Nick Budak thatbudakguy

View GitHub Profile
@thatbudakguy
thatbudakguy / initSoftAP.sh
Created February 23, 2017 22:02
shell script to start a wireless access point using hostapd and dnsmasq.
#!/bin/bash
#Initial wifi interface configuration
ifconfig $1 up 10.0.0.1 netmask 255.255.255.0
sleep 2
###########Start dnsmasq, modify if required##########
if [ -z "$(ps -e | grep dnsmasq)" ]
then
dnsmasq
fi
@thatbudakguy
thatbudakguy / hostapd.conf
Last active March 29, 2022 12:49
hostapd configuration for a 5ghz wireless network.
interface=(INTERFACE HERE)
driver=nl80211
ssid=(SSID HERE)
hw_mode=a
channel=36
country_code=US
ignore_broadcast_ssid=0
wpa=2
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@thatbudakguy
thatbudakguy / templateCache.json
Last active April 25, 2017 19:11
Primo new UI templateCache dump
{
"components/infra/formBuilder/field/form-field-radio.html": "<md-input-container layout=\"row\" layout-align=\"start start\">\r\n <md-radio-group ng-model=\"$ctrl.formData[$ctrl.field.name]\"\r\n \t\t\t layout=\"{{$ctrl.field.style && $ctrl.field.style.layout ? $ctrl.field.style.layout : 'row'}}\"\r\n \t\t\t layout-align=\"start start\" >\r\n <p ng-if=\"$ctrl.field.label\" class=\"label flex\" for=\"prm_{{$ctrl.field.label}}\" translate=\"{{$ctrl.field.label}}\"></p>\r\n <div {{$ctrl.field.style && $ctrl.field.style.layout === 'column' ? 'flex' : ''}}\r\n \tlayout=\"row\" layout-align=\"start center\" \r\n \tclass=\"layout-align-start-center layout-row \r\n \t\t{{$ctrl.field.style && $ctrl.field.style.layout === 'column' ? 'flex' : ''}}\"\r\n \tng-repeat=\"option in $ctrl.field.options\">\r\n \r\n\t <md-radio-button value=\"{{option.value}}\"\r\n\t \t\t\t\t (click)=\"$ctrl.field.events.onClick($ctrl.field.events.params)\" >\
@thatbudakguy
thatbudakguy / context.json
Last active May 23, 2017 18:03
accessceramics context.json
{
"@context": [{
"sc": "http://iiif.io/api/presentation/2#",
"iiif": "http://iiif.io/api/image/2#",
"dcterms": "http://purl.org/dc/terms/",
"dctypes": "http://purl.org/dc/dcmitype/",
"vra": "http://purl.org/vra/",
"title": {
"@id": "dcterms:title"
},
@thatbudakguy
thatbudakguy / custom.js
Created September 13, 2017 17:55
Linfield primo-explore custom.js
(function(){
"use strict";
'use strict';
/************************************* BEGIN Bootstrap Script ************************************/
var app = angular.module('viewCustom', ['forceServicesPageAuth', 'toggleInstitutions']);
/************************************* END Bootstrap Script ************************************/
This file has been truncated, but you can view the full file.
[{"category":["Politics and government","Socioeconomic conditions and development"],"place":["Paraguay"],"date":"2010"},{"category":["Minorities, ethnic and racial groups","Human and civil rights","Minorities, ethnic and racial groups"],"place":["United Kingdom"],"date":"2002"},{"category":["Politics and government","Politics and government","Politics and government","Politics and government"],"place":["Peru"],"date":"1985"},{"category":["Politics and government"],"place":["Panama"],"date":"2003"},{"category":["Politics and government","Politics and government"],"place":["Nicaragua"],"date":"2011"},{"category":["Human and civil rights","Gender","Human and civil rights"],"place":["Nicaragua"],"date":"2007"},{"category":["Human and civil rights"],"place":["Honduras"],"date":"2004"},{"category":["Environment and ecology","Environment and ecology"],"place":["Mexico"],"date":"1995-2000"},{"category":["Health","Health"],"place":["Mexico"],"date":"2006"},{"category":["Arts and culture","Arts and culture"],"place":["
@thatbudakguy
thatbudakguy / stein.json
Created February 15, 2019 21:30
mep account events
["1900-01-19", "1900-01-24", "1900-03-20", "1900-05-30", "1920-03-16", "1920-03-18", "1920-04-29", "1920-06-03", "1920-06-15", "1920-07-10", "1920-10-01", "1920-10-09", "1920-11-01", "1920-11-02", "1920-11-30", "1920-12-23", "1921-01-05", "1921-02-14", "1921-03-11", "1921-03-16", "1921-03-22", "1921-05-21", "1921-05-27", "1921-06-16", "1921-08-05", "1921-08-27", "1921-09-16", "1921-09-27", "1921-10-13", "1921-12-05", "1921-12-13", "1922-01-04", "1922-01-23", "1922-02-11", "1922-02-14", "1922-04-03", "1922-04-13", "1922-05-27"]
@thatbudakguy
thatbudakguy / migrate_blogposts.py
Last active September 12, 2019 20:50
cdhweb blog post migration
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cdhweb.settings')
import django
django.setup()
from xml.etree import ElementTree
from dateutil.parser import parse
from mezzanine.core.models import CONTENT_STATUS_DRAFT
from cdhweb.blog.models import BlogPost
from cdhweb.people.models import Person
@thatbudakguy
thatbudakguy / ddj.json
Created November 8, 2019 20:15
passim-test
{"id": "老子", "text": "道可道,非常道。名可名,非常名。無名天地之始;有名萬物之母。故常無欲,以觀其妙;常有欲,以觀其徼。此兩者,同出而異名,同謂之玄。玄之又玄,衆妙之門天下皆知美之為美,斯惡已。皆知善之為善,斯不善已。故有無相生,難易相成,長短相較,高下相傾,音聲相和,前後相隨。是以聖人處無為之事,行不言之教;萬物作焉而不辭,生而不有。為而不恃,功成而弗居。夫唯弗居,是以不去不尚賢,使民不爭;不貴難得之貨,使民不為盜;不見可欲,使心不亂。是以聖人之治,虛其心,實其腹,弱其志,強其骨。常使民無知無欲。使天知者不敢為也。為無為,則無不治道沖而用之或不盈。淵兮似萬物之宗。挫其銳,解其紛,和其光,同其塵。湛兮似或存。吾不知誰之子,象帝之先天地不仁,以萬物為芻狗;聖人不仁,以百姓為芻狗。天地之間,其猶橐籥乎?虛而不屈,動而愈出。多言數窮,不如守中谷神不死,是謂玄牝。玄牝之門,是謂天地根。綿綿若存,用之不勤天長地久。天地所以能長且久者,以其不自生,故能長生。是以聖人後其身而身先;外其身而身存。非以其無私耶?故能成其私上善若水。水善利萬物而不爭,處衆人之所惡,故幾於道。居善地,心善淵,與善仁,言善信,正善治,事善能,動善時。夫唯不爭,故無尤持而盈之,不如其已;揣而銳之,不可長保。金玉滿堂,莫之能守;富貴而驕,自遺其咎。功遂身退天之道載營魄抱一,能無離乎?專氣致柔,能嬰兒乎?滌除玄覽,能無疵乎?愛民治國,能無知乎?天門開闔,能為雌乎?明白四達,能無知乎?生之、畜之,生而不有,為而不恃,長而不宰,是謂玄德三十輻,共一轂,當其無,有車之用。埏埴以為器,當其無,有器之用。鑿戶牖以為室,當其無,有室之用。故有之以為利,無之以為用五色令人目盲;五音令人耳聾;五味令人口爽;馳騁田獵,令人心發狂;難得之貨,令人行妨。是以聖人為腹不為目,故去彼取此寵辱若驚,貴大患若身。何謂寵辱若驚?寵為下,得之若驚,失之若驚,是謂寵辱若驚。何謂貴大患若身?吾所以有大患者,為吾有身,及吾無身,吾有何患?故貴以身為天下,若可寄天下;愛以身為天下,若可託天下視之不見,名曰夷;聽之不聞,名曰希;搏之不得,名曰微。此三者不可致詰,故混而為一。其上不皦,其下不昧。繩繩不可名,復歸於無物。是謂無狀之狀,無物之象,是謂惚恍。迎之不見其首,隨之不見其後。執古之道,以御今之有。能知古始,是謂道紀古之善為士者,微妙玄通,深不可識。夫唯不可識,故強為之容。豫兮若