Skip to content

Instantly share code, notes, and snippets.

View ArthurN's full-sized avatar

Arthur Nisnevich ArthurN

  • Boulder, CO
  • 01:08 (UTC -06:00)
View GitHub Profile
@ArthurN
ArthurN / BootstrapMultiselect.vue
Created January 24, 2018 15:28
Vue wrapper for jquery bootstrap multiselect
<template lang='slm'>
select.form-control multiple="multiple"
option v-for="option in selectOptions" :value='option.value' {{ option.label }}
</template>
<script>
export default {
name: 'bootstrap-multiselect',
props: {
selectOptions: {

Keybase proof

I hereby claim:

  • I am arthurn on github.
  • I am arthurn (https://keybase.io/arthurn) on keybase.
  • I have a public key ASAMIYJVK2x339Jmc7L8QypS9XFOTA2qZbvqdJ7LkKakWQo

To claim this, I am signing this object:

@ArthurN
ArthurN / pipeline.yml
Created May 11, 2023 04:20
Fitstack - Azure Pipeline Example
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
imageName: 'your-app-image'
testScript: 'YOUR-TEST-SCRIPT.SH'
@ArthurN
ArthurN / instructions.md
Created May 17, 2023 15:47
Long-running ContainerFit POC

Long-running ContainerFit session

Install screen (if not already installed)

On Ubuntu/Debian: sudo apt install screen

On Red Hat: sudo yum install screen

Kick off ContainerFit

@ArthurN
ArthurN / knapsack.exs
Created February 28, 2024 16:18
Knapsack Elixir
# mostly Copilot generated, have not tested/verified
defmodule ImagePlacement do
def place_images(images, canvas_width, canvas_height) do
# Sort images by size in descending order
sorted_images = Enum.sort_by(images, &image_area(&1), &>=/2)
# Initialize the canvas with the first image
canvas = %{x: 0, y: 0, width: image_width(hd(sorted_images)), height: image_height(hd(sorted_images))}
import pprint
import extruct
import requests
from w3lib.html import get_base_url
# https://www.crosswaterlondon.com/product/mpro-towel-holder?variant=54381#image-2
pp = pprint.PrettyPrinter(indent=0)
r = requests.get('https://www.signaturehardware.com/ruscello-widespread-bathroom-faucet/951334.html')
base_url = get_base_url(r.text, r.url)
@ArthurN
ArthurN / gist:b13ca1e948b2337ffa043e4c073f0d3b
Created November 27, 2024 21:04
list divided by bullet
ul.stats {
padding: 0;
margin: 0;
li {
display: inline;
white-space: nowrap;
color: var(--p-surface-600);
}