I hereby claim:
- I am delikat on github.
- I am delikat (https://keybase.io/delikat) on keybase.
- I have a public key whose fingerprint is 0A1D 2349 B7B1 CEDC BBD6 1568 04A3 F9A2 2559 1EC7
To claim this, I am signing this object:
# database.py | |
from flask_sqlalchemy import SQLAlchemy | |
db = SQLAlchemy() | |
# models.py | |
from database import db | |
class Request(db.Model): | |
# ... |
const withLess = require('@zeit/next-less') | |
const withTypescript = require('@zeit/next-typescript') | |
const resolve = require('resolve') | |
module.exports = withTypescript(withLess({ | |
lessLoaderOptions: { | |
javascriptEnabled: true, | |
// theme antd here | |
modifyVars: {'@primary-color': '#1Dd57A'} |
const withLess = require('@zeit/next-less') | |
const withTypescript = require('@zeit/next-typescript') | |
const resolve = require('resolve') | |
module.exports = withTypescript(withLess({ | |
lessLoaderOptions: { | |
javascriptEnabled: true, | |
// place antd theme overrides here | |
modifyVars: {'@primary-color': '#1Dd57A'} | |
}, |
# Example Flask implementation of secure webhooks | |
# Assumes webhook's secret is stored in the environment variable WEBHOOK_SECRET | |
from hashlib import sha1 | |
import hmac | |
import os | |
from flask import Flask, request, abort | |
@app.route('/webhooks/optimizely', methods=['POST']) |
I hereby claim:
To claim this, I am signing this object:
var bitwiseCountNQueensSolutions = function(n) { | |
var solutions = 0; | |
var allBits = Math.pow(2, n) - 1; | |
var bitwiseQueens = function(majorDiag, col, minorDiag) { | |
var poss = ~(majorDiag | col | minorDiag) & allBits; | |
while (poss) { | |
var queenSpot = -poss & poss; | |
poss = poss ^ queenSpot; | |
bitwiseQueens((majorDiag | queenSpot) >> 1, col | queenSpot, (minorDiag | queenSpot) << 1); |
var spiralTraversal = function(matrix){ | |
var width = matrix[0].length - 1; | |
var height = matrix.length; | |
var newMatrix = []; | |
var firstRow = matrix[0]; | |
if (matrix.length === 1) { | |
return matrix[0]; | |
} |