Skip to content

Instantly share code, notes, and snippets.

View bsmirnov's full-sized avatar

Boris Smirnov bsmirnov

View GitHub Profile
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@bsmirnov
bsmirnov / voucherator.py
Created February 6, 2017 14:18 — forked from gholms/buttond.py
Unifi wireless voucher generator
#!/usr/bin/python -tt
# Copyright 2017 Garrett Holmstrom
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License or (at your
# option) any later version accepted by the Santa Barbara Hackerspace (or
# its successor approved by the Santa Barbara Hackerspace), which shall
# act as a proxy as defined in Section 14 of version 3 of the license.
@bsmirnov
bsmirnov / voucherator.py
Created February 6, 2017 14:18 — forked from gholms/buttond.py
Unifi wireless voucher generator
#!/usr/bin/python -tt
# Copyright 2017 Garrett Holmstrom
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License or (at your
# option) any later version accepted by the Santa Barbara Hackerspace (or
# its successor approved by the Santa Barbara Hackerspace), which shall
# act as a proxy as defined in Section 14 of version 3 of the license.
@bsmirnov
bsmirnov / what-to-wear.js
Created January 15, 2016 02:34 — forked from monkbroc/what-to-wear.js
What to wear
function forecastUrl(apiKey, location) {
var apiUrl = "https://api.forecast.io/forecast";
var excludeFields = "exclude=minutely,hourly";
return apiUrl + "/" + apiKey + "/" + location + "?" + excludeFields;
}
function getForecast(url) {
var got = require("got");
return got(url)
.then(function (response) {
@bsmirnov
bsmirnov / list.md
Last active August 29, 2015 14:27

Remaining issues NJCORE

  • Search page Uploaded By missing user name for anonymous.
  • Uploaded by on node resource says anonymous when user is anonymous.
  • Dashboard can be seen by anonymous, what is the expected behavior
  • Anion / dashboard upload resource 404
  • Add resource button 404
  • State Standards links to resources
  • Toolkit: Professional Development is cutoff. CSS ?
  • Footer : Standards links to standards/statestand
@bsmirnov
bsmirnov / gist:0b32ca045d35046b49bc
Last active August 29, 2015 14:19
Content Lock

#Issue Symptoms:

When on node add/edit page. When uploading images only one works and we get javascript error relating to jQuery function:

	(anonymous function) (content_lock_init.js, line 30)```

#Issue Analysis:

It seems the issue is related to how we are handling header/footer js and alternate versions of jQuery mapped to $ and jQuery. Because the jQuery plugins are mapped to $ and jQuery variable separately by Drupal and BH versions of jquery and javascript using the wrong($/jQuery) one will return undefined for some functions.
/* Expects month to be in 1-12 index based. */
var monthInformation = function(year, month){
/* Create a date. Usually month in JS is 0-11 index based but here is a hack that can be used to calculate total days in a month */
var date = new Date(year, month, 0);
/* Get the total number of days in a month */
this.totalDays = date.getDate();
/* End day of month. Like Saturday is end of month etc. 0 means Sunday and 6 means Saturday */
this.endDay = date.getDay();
date.setDate(1);
/* Start day of month. Like Saturday is start of month etc. 0 means Sunday and 6 means Saturday */
#!ipxe
set base-url http://stable.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvK1T034jicwW9vPelQrny4/8YGbEXSRX9DFZP0O8VM8nJaPJlMDCt2fqjc6TywThf0qsKJQX6jwZfIATHluZ86V+McJlQ0hJmdHu0i+oINxKTzArOemarwhtnEIpclg9jW1goukRK1GMFvkrSNYKCMC1BGTC5BZdG+I4OW9OnAM60D9ESG5rPbgOC4JeovNQB1pdVH2hmL8IZTYdYzWsWJxBtZGZ42eBLXJh+E6/QWojRr1AFphdaQDlyi4N3VLwmp+Ts7z4zRQLu1ijf2rmfDeJ9oV+ZhSoonbL89Kyvdq0lNJQsopSbVRXXEOfHOVD45+P8YOyHujixdDUGIeDhw== boris@even5.com
"
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
Verifying that +bsmirnov is my Bitcoin username. You can send me #bitcoin here: https://onename.io/bsmirnov