Skip to content

Instantly share code, notes, and snippets.

Matthew Bednarski matthewbednarski

Block or report user

Report or block matthewbednarski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
matthewbednarski / postal-codes.json
Last active Dec 3, 2019
Global postal codes regex formats
View postal-codes.json
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$"}, { "Note":
View test.ui.xml
xmlns:sap.ui.core.mvc="sap.ui.core.mvc" >
<sap.m:Panel headerText="dfdff" expandable="true" expanded="true">
<sap.ui.core:CustomData key="sap-ui-fastnavgroup" value="true" writeToDom="true"></sap.ui.core:CustomData>
View test.controller.js
return (function(q, _, context) {
var defer = q.defer();
sap.ui.require(["aicomp/domain/element/api", "aicomp/service/noty"], function(
) {
var current = api.current();
var flatcodes = flattenAndGroup(current);
api.model().setProperty("/flat_codes_start", shallowclone(flatcodes));
View jquery.dropbox.js
* Extends jQuery with dropbox crud functionality
* All API methods return a promise unless specified otherwise.
(function($) {
dropboxAuth: new DropboxAuth(),
matthewbednarski / mimeapps.list
Created Mar 11, 2015
Instruct xdg to use mutt as default email application. Both files go in ~/.local/share/applications
View mimeapps.list
[Default Applications]
matthewbednarski /
Created Aug 26, 2015
An example for a Spring Boot Application which overrides the default servlet registration
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.DispatcherServlet;
View test
Welcome to StackEdit!
Hey! I'm your first Markdown document in **StackEdit**[^stackedit]. Don't delete me, I'm very helpful! I can be recovered anyway in the **Utils** tab of the <i class="icon-cog"></i> **Settings** dialog.
matthewbednarski / cdnjs-client
Last active Feb 20, 2016
a very ( too ) simple javascript libs manager
View cdnjs-client
# parameters:
# conf: (required) points a cdnjs-client.json file; eg. [cdnjs-client.json](
# requires: jq, wget
matthewbednarski / jquery.ajax.blob.js
Created Oct 23, 2015
Exents $.ajax to return binary formats without string serialization
View jquery.ajax.blob.js
(function($) {
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2
* within the comfortable framework of the jquery ajax request, with full support for promises.
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that
matthewbednarski / spinner-directive.js
Last active Oct 2, 2015
a spinner directive using bootstrap modal and font-awesome fonts
View spinner-directive.js
(function() {
var app = angular.module('mcbSpin', [])
.directive('spinner', [Spinner]);
function Spinner() {
return {
restrict: 'EA', //E = element, A = attribute, C = class, M = comment
replace: true,
scope: {
show: '@',
You can’t perform that action at this time.