Skip to content

Instantly share code, notes, and snippets.

View ergusto's full-sized avatar
😏

Fergus Ruston ergusto

😏
View GitHub Profile
@ergusto
ergusto / package-lock-conflicts.md
Created June 1, 2023 11:17 — forked from szemate/package-lock-conflicts.md
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    git pull
    
  2. Merge your feature branch into master:
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Fergus Ruston",
"label": "Developer - interested in remote contract opportunities working with Javascript/React",
"image": "",
"email": "fergus.ruston@gmail.com",
"phone": "",
"url": "https://dribbble.com/ergusto",
"summary": "",

Keybase proof

I hereby claim:

  • I am ergusto on github.
  • I am ergusto (https://keybase.io/ergusto) on keybase.
  • I have a public key ASDwl1KP-_bnEetlmHKSAm_hNYzbN82aRxzUoVLlgSnOXwo

To claim this, I am signing this object:

@ergusto
ergusto / vim-cheathsheet.md
Last active October 1, 2019 20:36
An evolving Vim cheetsheet

Verbs, Nouns & Adverbs

  • dap - Delete Around Paragraph
  • yib - Yank In Brackets
  • yap - Yank Around Paragraph
  • das - Delete Around Sentence
  • di' - Delete in quotes
  • <ii - Shift current block to the left (provided by vim-indent-object)

Find & Search within file

@ergusto
ergusto / tmux-cheatsheet.md
Last active July 3, 2019 23:43
An evolving tmux cheatsheet I add to as I learn things

ctrl-b z Zoom in and out of a single pane.

@ergusto
ergusto / reminder.sh
Last active March 1, 2019 16:52 — forked from lekro/reminder.sh
Send discord webhook using curl
#!/bin/sh
WEBHOOK_URL="put your url here"
JSON="{\"content\":null,\"embeds\": [{\"color\": \"16237652\"},{\"timestamp\": \"YYYY-MM-DDTHH:MM:SS.MSSZ\"},{\"fields\": [{\"name\": \"Grabbed Movie\",\"value\": \"$radarr_movie_title\"},{\"name\": \"Release Name\",\"value\": \"$radarr_release_title\"},{\"name\": \"Quality\",\"value\": \"$radarr_release_quality\",\"inline\": true},{\"name\": \"Source\",\"value\": \"$radarr_release_indexer\",\"inline\": true},{\"name\": \"Size\",\"value\": \"$radarr_release_size\"}]}]}\"
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL"
@ergusto
ergusto / SignS3RequestAPIView.py
Created July 12, 2017 23:36
For signing direct to S3 file uploads with Django Rest Framework
import os, boto3
from botocore.client import Config
from django.conf import settings
from rest_framework import parsers
from rest_framework.permissions import IsAuthenticated
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.renderers import JSONRenderer
import functools
from channels.handler import AsgiRequest
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.settings import api_settings
authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES]
@ergusto
ergusto / upload.py
Created January 22, 2017 17:49 — forked from RyanBalfanz/upload.py
[Heroku] Direct to S3 File Uploads in Python
"""
Fix for some issues with the original code from Heroku:
https://devcenter.heroku.com/articles/s3-upload-python
This example is also designed for use with Django, not Flask as in the original.
"""
import base64
import hashlib
import hmac