Skip to content

Instantly share code, notes, and snippets.

View Lockyc's full-sized avatar
:octocat:
to be a philosopher, one must axolotl questions

Lachlan Collins Lockyc

:octocat:
to be a philosopher, one must axolotl questions
View GitHub Profile
@ECHO OFF
IF "%1" == "" GOTO ERROR
ECHO.
ECHO Checking dir %1 recursively for drivers.
ECHO.
FOR /F "tokens=*" %%D IN ('DIR /B /AD /S %1') DO PNPUTIL -a "%%D\*.inf" 2>&1 >> %WinDir%\system32\driverimport.log

Keybase proof

I hereby claim:

  • I am lockyc on github.
  • I am lockyc (https://keybase.io/lockyc) on keybase.
  • I have a public key whose fingerprint is CD83 33D1 3EA2 19DE 94FE 71BA BF6C EEA0 DFE2 2990

To claim this, I am signing this object:

@Lockyc
Lockyc / 0_reuse_code.js
Created December 21, 2016 01:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Lockyc
Lockyc / caddy.sh
Created May 17, 2017 07:01 — forked from Jamesits/caddy.sh
Install Caddy Server on Ubuntu with Systemd.
# Run as root please
apt install curl
curl -L https://getcaddy.com | bash -s http.awslambda,http.cgi,http.cors,http.expires,http.filemanager,http.filter,http.git,http.hugo,http.ipfilter,http.jwt,http.mailout,http.minify,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.upload,dns,net,hook.service
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
mkdir /etc/ssl/caddy

Keybase proof

I hereby claim:

  • I am Lockyc on github.
  • I am lockyc (https://keybase.io/lockyc) on keybase.
  • I have a public key whose fingerprint is 8EA8 01BF 68C9 0444 58CC DED0 B157 5E43 8C18 FDA8

To claim this, I am signing this object:

@Lockyc
Lockyc / Update-branch.md
Created October 23, 2019 10:40 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@Lockyc
Lockyc / README.md
Last active April 24, 2020 00:52
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@Lockyc
Lockyc / submit.md
Created December 9, 2021 22:10 — forked from tanaikech/submit.md
Automatic Recalculation of Custom Function on Spreadsheet Part 2

Automatic Recalculation of Custom Function on Spreadsheet Part 2

Description

I have already reported about "Automatic Recalculation of Custom Function on Spreadsheet Part 1" at here. Here, I would like to introduce other workaround for forcibly recalculating the custom functions and built-in functions using Class TextFinder. Class TextFinder has added at April 5, 2019. By this, this workaround can be proposed.

Sample scripts

Pattern 1

@Lockyc
Lockyc / submit.md
Created December 9, 2021 22:10 — forked from tanaikech/submit.md
Automatic Recalculation of Custom Function on Spreadsheet Part 1

Automatic Recalculation of Custom Function on Spreadsheet Part 1

In this report, I would like to introduce a workaround for automatically recalculating custom functions on Spreadsheet.

1. Situation

The sample situation is below. This is a sample situation for this document.

  • There are 3 sheets with "sheet1", "sheet2" and "sheet3" of sheet name in a Spreadsheet.
  • Calculate the summation of values of "A1" of each sheet using a custom function.
  • Sample script of the custom function is as follows.
@Lockyc
Lockyc / submit.md
Created December 10, 2021 00:11 — forked from tanaikech/submit.md
Downloading and Uploading File to Google Drive without Saving File with Stream and Resumable Upload using Node.js

Downloading and Uploading File to Google Drive without Saving File with Stream and Resumable Upload using Node.js

This is a sample script of Node.js for downloading the data and uploading the data to Google Drive with the resumable upload without saving it as a file. The downloaded data is uploaded to Google Drive with the stream.

Sample script

Before you use this, please set the variables of accessToken, url, fileSize, mimeType and filename. In this case, fileSize is required to set because the data is uploaded with the resumable upload.

const request = require("request");