Skip to content

Instantly share code, notes, and snippets.

View mercul3s's full-sized avatar
🐓
Code Farming

Mercedes Coyle mercul3s

🐓
Code Farming
View GitHub Profile
@traumverloren
traumverloren / how-to-readme-guestbook.md
Last active October 7, 2023 07:54
How to Create a Guestbook for Your Github Personal Readme!

How to Create a Guestbook for Your Github Personal Readme!

To create a "guestbook", like this we can use the image hosting & commenting abilities of Github Gists ftw! ✨

Create a Gist to Host Your Guestbook & Image

  1. Log into Github

  2. Go to https://gist.github.com

  3. Select "+" in the top right corner of the toolbar to create a new gist and save it as public gist.

# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# This snippet shows you how to use Blob.generate_signed_url() from within compute engine / cloud functions
# as described here: https://cloud.google.com/functions/docs/writing/http#uploading_files_via_cloud_storage
# (without needing access to a private key)
# Note: as described in that page, you need to run your function with a service account
# with the permission roles/iam.serviceAccountTokenCreator
import os, google.auth
from google.auth.transport import requests
@allison-lara
allison-lara / zoom.fish
Created October 25, 2018 18:37
ZOOM for fish
function zoom --argument meeting
switch "$meeting"
case standup
set meetingId YOUR_STANDUP
case personal
set meetingId YOUR_PERSONAL
case ''
set meetingId YOUR_PERSONAL
case '*'
set meetingId $meeting
@simonw
simonw / recover_source_code.md
Last active September 28, 2024 08:10
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@Siva-Charan
Siva-Charan / Docker-find-dependent-child-image.md
Last active October 9, 2022 11:18
Docker: How to find the dependent child images?

Find the dependent child images on Docker

When you try to remove the docker image with the following command

docker rmi 6795374be8c1

Sometimes you might be facing below error:

Error response from daemon: conflict: unable to delete 6795374be8c1 (cannot be forced) - image has dependent child images

Below is the Docker command line used to find the dependent child images

@cridenour
cridenour / gist:74e7635275331d5afa6b
Last active August 22, 2024 14:20
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@richardiux
richardiux / dependencies.sh
Last active November 29, 2017 13:25
golang on smartos with image magick
pkgin -y install git mercurial gcc47 gmake giflib-5.0.5 ImageMagick-6.8.7.4
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/gocode
cd
hg clone -u release https://code.google.com/p/go
cd go
hg update default
@samuelclay
samuelclay / LED Dress.ino
Last active February 15, 2024 16:07
For New Year's Eve 2014, my girlfriend and I went to a dance party where wearable electronics were not only encouraged but also on display from a variety of hobbyists. I decided to use this as an opportunity to combine two of my favorite hobbies: sewing and electronics. We attached six addressable LED strands from Sparkfun ($20 each) to the lini…
#include <Adafruit_NeoPixel.h>
#include "WS2812_Definitions.h"
#define PIN_A 9
#define PIN_B 3
#define PIN_C 2
#define PIN_D 12
#define PIN_E 10
#define PIN_F 6
#define LED_COUNT 43
@airawat
airawat / 00-OozieCoordinatorJobWithFileAsTrigger
Last active February 12, 2018 10:10
Oozie coordinator job example with trigger file as trigger
This gist includes components of a oozie (trigger file initiated) coordinator job -
scripts/code, sample data and commands; Oozie actions covered: hdfs action, email action,
java main action, hive action; Oozie controls covered: decision, fork-join; The workflow
includes a sub-workflow that runs two hive actions concurrently. The hive table is
partitioned; Parsing uses hive-regex serde, and Java-regex. Also, the java mapper, gets
the input directory path and includes part of it in the key.
Usecase
-------
Parse Syslog generated log files to generate reports;