Skip to content

Instantly share code, notes, and snippets.

View bright-spark's full-sized avatar
♥️
Tinkering with stuff!

martin. bright-spark

♥️
Tinkering with stuff!
View GitHub Profile
@Udara-Dananjaya
Udara-Dananjaya / Install KASM Workspace.sh
Last active September 11, 2024 01:38
Build Kasm Workspace on Ubuntu: Setup swap, firewall, hostname & Kasm installation with SSL. Simplify secure virtual workspaces!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@m-triassi
m-triassi / kasm_cert.sh
Last active September 15, 2024 00:51
Generate an SSL certificate for a KASM instance. Requires Certbot & Docker to be installed.
#!/usr/bin/env bash
# Leverages Docker containers to create a temporary signing server
# Obtain a SSL cert and then apply it to the service in question we're interested in
# Usage: ./kasm_cert.sh mydomain.test
mkdir -p /tmp/webroot
# Start an ephemeral nginx container

Push Only dist/ Folder To Live Server

I have googled many things and explored many questions on Stack Overflow to find the best way to push only dist/ directory to live server. I couldn't find any good solution but one person on Stackoverflow suggested to look at Git Submodules and this is the best solution I could come up with. I have never heard of submodules before because almost nobody uses them. If you never heard of it too then I'll first explain what a submodule is and then I'll show you how you can use submodules to push only dist/ directory to a live server.

@bright-spark
bright-spark / index.html
Created September 8, 2022 14:27
YouTube No Cookie Permissive Embed
<iframe id="ytplayer" type="text/html" width="480" height="270" src="https://www.youtube-nocookie.com/embed/?list=PLuWIxgNYqm0lJH4UKIFrZnyfjpnRGsxdr&listType=playlist&modestbranding=1&playsinline=1&color=red&iv_load_policy=3" frameborder="0" allowfullscreen allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; geolocation" loading="eager">
@bright-spark
bright-spark / web-servers.md
Created December 18, 2021 22:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@bright-spark
bright-spark / .. MediaCreationTool.bat ..md
Created November 6, 2021 13:49 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction

  • new update introducing no 11 setup checks on boot in VirtualBox

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 10 / 11 deployment automation tool as well!

configure via set vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat
recommended windows setup options with the least amount of issues on upgrades set via auto.cmd

@bright-spark
bright-spark / artifakt-a-simple-responsive-embed.markdown
Last active April 21, 2021 12:33
Artifakt a Simple Responsive Embed
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active September 13, 2024 03:14
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat