Skip to content

Instantly share code, notes, and snippets.

View mwoodbri's full-sized avatar

Mark Woodbridge mwoodbri

View GitHub Profile
@kostiklv
kostiklv / remember_password.html
Created May 12, 2011 16:53
How to make browser's remember password work with dynamic/AJAX login form
<html>
<!--
This is an example of how to make browsers
offer to remember password and later fill in those passwords
for dynamic login forms.
To make the browser offer to remember passwords the form should be actually submitted.
Since we are handling login with AJAX we don't want the form to submit, so we are still submitting it
into a dummmy iframe with dummy URL.
It's good idea to actually create empty dummy.html file, otherwise you'll flood you error.log with 404s
@u840903
u840903 / git-submodules.md
Last active April 22, 2022 14:40
Github Submodule Cheat Sheet

Add a submodule

git submodule add https://github.com/janjarfalk/canvasrunner.git components/canvasrunner/

Update all submodules

git submodule foreach git pull origin master
cd ..
git commit . -m "Updated submodules"
@LincolnUniLTL
LincolnUniLTL / pubitem.pl
Last active October 27, 2017 15:23
Get or set Symplectic Elements publication item metadata using the Elements API
#! /usr/bin/perl
# *********************************************************
# Invoke the Symplectic Elements API with a get or set call
# to a publication item
# (/{cat}/records/{source}/{proprietary-id} API method)
# using either HTTP GET or PUT (set) depending on arguments.
# Usage:
# - get/dump : pubitem.pl $id
# - set/amend: pubitem.pl $id $xmlfile
@paton
paton / simple.js
Last active October 7, 2019 16:14
Super simple implementation of define() and require() used in Localize.js (https://localizejs.com)
var define, require;
(function() {
var modules = {};
require = function(name) {
return modules[name]();
};
define = function(name, fn) {
@mcescalante
mcescalante / cx_oracle_install_instructions.md
Last active November 13, 2017 20:46
cx_Oracle installation instructions/notes for macOS or Linux

cx_Oracle Installation Instructions

I've had to put cx_Oracle (python Oracle database connector) on macOS and Linux, and both processes were similar but poorly documented on Oracle's website.

These instructions were written and tested using the client 12.1. The instructions for any 12.x are the same, but you may need to change 12_1 to 12_2 in commands if you are using version 12.2, etc.

Instructions

  1. Download 64 bit (easy to download 32 by mistake) basic + sdk instantclient from Oracle website (Note: you need an account, I used throwaway email)
@5agado
5agado / Pandas and Seaborn.ipynb
Created February 20, 2017 13:33
Data Manipulation and Visualization with Pandas and Seaborn — A Practical Introduction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sirodoht
sirodoht / migrate-django.md
Last active October 10, 2024 05:54
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@taylorhutchison
taylorhutchison / SnackbarInterceptor.ts
Last active December 2, 2022 13:17
An Angular interceptor to show a Material Snackbar on success or error of an HTTP POST/PUT.
import { Injectable } from '@angular/core';
import {
HttpRequest,
HttpHandler,
HttpEvent,
HttpInterceptor,
HttpResponse
} from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, tap, } from 'rxjs/operators';
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
component: resolv
tier: node
name: resolv
namespace: default
spec:
selector: