This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AKNativeAnisetteService.m | |
// akd | |
// | |
// Created by Scott Knight on 5/10/19. | |
// Copyright © 2019 Scott Knight. All rights reserved. | |
// | |
#import <AuthKit/AuthKit.h> | |
#import "AKNativeAnisetteService.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244 | |
// 99.99% Credit to Martin R! | |
// Mapping from XML/HTML character entity reference to character | |
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references | |
private let characterEntities : [String: Character] = [ | |
// XML predefined entities: | |
""" : "\"", | |
"&" : "&", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Me | |
package main | |
// package random | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var animal = { | |
name: 'Karl', | |
type: 'cat', | |
color: 'black', | |
age: 7 | |
}; | |
//convert JSON animal into a string | |
var dehydratedAnimal = JSON.stringify(animal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to add a field to the Django Admin Add User form | |
# using UserCreationForm. Add this to a admin.py and alter | |
# to whatever fields you'd like | |
from django.contrib.auth.forms import UserCreationForm | |
from django.contrib.auth.models import User | |
from django.contrib.auth.admin import UserAdmin | |
from django import forms | |
from django.utils.translation import ugettext_lazy as _ | |
from django.contrib import admin |