Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Murphy Splode

View GitHub Profile
@gricard
gricard / webpack4upgrade.md
Last active Jun 3, 2021
Just some notes about my attempt to upgrade to webpack 4
View webpack4upgrade.md

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active Sep 23, 2022
Download Audio from YouTube with youtube-dl
View youtube-dl-download-audio-only-on-best-quality.md

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active Aug 16, 2022 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
View export-named-sheet-as-csv.gs
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@Splode
Splode / .gitignore
Created Aug 9, 2017
Gitignore Template
View .gitignore
# ================ Windows =====================
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@lalkmim
lalkmim / codility_solutions.txt
Last active Sep 24, 2022
Codility Solutions in JavaScript
View codility_solutions.txt
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
@phillipsharring
phillipsharring / Kernel.php
Last active Sep 30, 2022 — forked from kkiernan/MySqlDump.php
Laravel Artisan command to perform MySQL Dump using database connection information in the .env file. Forked from https://gist.github.com/kkiernan/bdd0954d0149b89c372a
View Kernel.php
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
View gist:2b80771a5582b7528d9e
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@hans2103
hans2103 / .htaccess-mod_headers
Created Apr 13, 2015
.htaccess rules to set cache control.
View .htaccess-mod_headers
<IfModule mod_headers.c>
Header set Connection keep-alive
# Cache-control headers
# 2 HOURS
#<filesMatch "*">
Header set Cache-Control "max-age=7200, must-revalidate"
#</filesMatch>
# 480 weeks - 290304000
@jpillora
jpillora / smtp-gmail-send.go
Last active Sep 30, 2022
Send email using Go (Golang) via GMail with net/smtp
View smtp-gmail-send.go
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
@myusuf3
myusuf3 / delete_git_submodule.md
Created Nov 3, 2014
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule