- Add a bunch of images to a 'page'. Just images. No markup besides img elements.
- Create a page.lookbook template and in it, add the code below.
- Assign template to page.
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
// Interpolate between 2 colors in C# | |
// Taken from answer by user Jason | |
// http://stackoverflow.com/questions/1236683/color-interpolation-between-3-colors-in-net | |
class ColorInterpolator { | |
delegate byte ComponentSelector(Color color); | |
static ComponentSelector _redSelector = color => color.R; | |
static ComponentSelector _greenSelector = color => color.G; | |
static ComponentSelector _blueSelector = color => color.B; | |
public static Color InterpolateBetween( |
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
// From https://blog.dantup.com/2016/07/simplest-csharp-code-to-post-a-tweet-using-oauth/ | |
/// <summary> | |
/// Simple class for sending tweets to Twitter using Single-user OAuth. | |
/// https://dev.twitter.com/oauth/overview/single-user | |
/// | |
/// Get your access keys by creating an app at apps.twitter.com then visiting the | |
/// "Keys and Access Tokens" section for your app. They can be found under the | |
/// "Your Access Token" heading. | |
/// </summary> |
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
################## Ticks to candles in kiteconnect python #################### | |
# Author : Arun B | |
# Reference : http://ezeetrading.in/Articles/Candles_formation_from_tick_data_zerodha.html | |
# Purpose : Convert ticks to candles by putting ticks in a queue. This redues time wasted in on_ticks function | |
################################################################################ | |
from kiteconnect import KiteTicker | |
import datetime | |
from copy import copy | |
import queue |
I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.
- Create a privileged LXC container through the Proxmox web interface
- Enable nesting and FUSE
- In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
- SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
- Add the following lines
- lxc.apparmor.profile: unconfined
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
#include <iostream> | |
#include "Python.h" | |
int main() | |
{ | |
//Initialize the python instance | |
Py_Initialize(); | |
//Run a simple string | |
PyRun_SimpleString("from time import time,ctime\n" |
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
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
#include <stdexcept> | |
#include <cstring> | |
#include <openssl/aes.h> | |
#include <openssl/err.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
import http.server | |
import http.cookiejar | |
import io | |
import socket | |
from http import HTTPStatus | |
import ssl | |
import os | |
import zlib | |
server_address = ('0.0.0.0', 4443) |