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

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 June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@bright-spark
bright-spark / browser_detect.js
Created September 29, 2018 23:30 — forked from 2107/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
@rhukster
rhukster / sphp.sh
Last active March 30, 2024 10:41
Easy Brew PHP version switching (Now moved to https://github.com/rhukster/sphp.sh)
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
#
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh
# >>> Kept here for legacy purposes
#
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)