Skip to content

Instantly share code, notes, and snippets.

local wezterm = require "wezterm"
local config = wezterm.config_builder()
local action = wezterm.action
config.set_environment_variables = {
PATH = '/opt/homebrew/bin:' .. os.getenv('PATH')
}
local function scheme_for_appearance(appearance)
if appearance:find "Dark" then
@vladkens
vladkens / git-sync.sh
Created December 2, 2022 19:27
git sync
#!/usr/bin/env bash
# Debug: Print all commands with expanded variables
# set -x
# Get all remote refs & remove outdated local refs
git fetch --all --prune
# Create local copy of remote branch & load latest changes
for rb in `git branch --remotes | grep -v 'HEAD'`; do
FROM node:16-alpine
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn app:build
EXPOSE 3000
CMD node dist/app.js
@vladkens
vladkens / # python - 2016-09-11_01-01-36.txt
Created September 12, 2016 21:41
python on Mac OS X 10.12 - Homebrew build logs
Homebrew build logs for python on Mac OS X 10.12
Build date: 2016-09-11 01:01:36
@vladkens
vladkens / xml_tools.php
Last active August 29, 2015 14:09
XML represents as array
<?php
define('XML_RETURN_DOM_ELEMENT', 1);
define('XML_WITHOUT_DECLARATION', 2);
define('XML_PRETTY_PRINT', 4);
function xml_decode($node) {
$node = is_string($node) ? new \SimpleXMLElement($node) : $node;
$result = ['tag' => $node->getName()];
foreach ($node->attributes() as $name => $value) {
$value = (array) $value;
<!doctype html>
<meta charset="utf-8" />
<style>
#canvas {
display: block;
margin: 0 auto;
border: 1px solid black;
}
</style>