Skip to content

Instantly share code, notes, and snippets.

@richardblondet
richardblondet / README.md
Last active May 3, 2024 10:02
Create a simple API backend with Google App Script and a Spreadsheet

Google App Script CRUD

Inspired by this gist.

Getting Started

  1. Create a new App Script project.
  2. Paste the content of the file google-app-script-crud.gs in the default Code.gs file.
  3. Create a new Spreadsheet.
  4. Copy the Spreadsheet ID found in the URL into the variable SHEET_ID located in line 1 of your file.
@pwillis-els
pwillis-els / Heap_Dump_Java_AWS_ECS.md
Created June 29, 2020 14:13
Dumping heap of a Java process running in AWS ECS

Heap dumping a Java process running in AWS ECS

Note: this guide is designed for AWS ECS services, but starting from Step 4 is functionally equivalent to any Docker container on a Linux host.

Step 1. Look up ECS service

  1. Log into the AWS Console using the appropriate AWS account
  2. Navigate to AWS ECS service clusters (https://console.aws.amazon.com/ecs/home)
  3. Make sure you are in the correct region, if not, switch to the correct region (second drop-down menu in top right corner)
  4. Select the correct cluster (ex: https://console.aws.amazon.com/ecs/home?region=us-east-1#/clusters//services)
  5. In the Services tab, In the 'Filter in this page' text box, type the name of the service
@ergoz
ergoz / haproxy.sh
Created October 1, 2019 10:14 — forked from trungv0/haproxy.sh
RabbitMQ cluster with HAProxy & Keepalived for high availability
# install haproxy
yum install -y haproxy
# config haproxy for rabbitmq
cat > /etc/haproxy/haproxy.cfg << "EOF"
global
log 127.0.0.1 local0 notice
maxconn 10000
user haproxy
@sagar285
sagar285 / gist:3f7542d13606dee3b525e3315b46d453
Created July 18, 2023 00:21
aws deployment on instanc
Steps to deploy a Node.js app to aws using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
## 1. Create Free AWS Account
Create free AWS Account at https://aws.amazon.com/
## 2. Create and Lauch an EC2 instance and SSH into machine
I would be creating a t2.medium ubuntu machine for this demo.
## 3. Install Node and NPM
```
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 3, 2024 10:01
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@Darkhax
Darkhax / pr_guide.md
Created December 5, 2022 03:50
Modding PR Guide

This guide contains some helpful information on how to actively contribute to mods. This guide is targeted towards contributors that may not have much technical experience and will only require the GitHub web UI. This guide is perfect for localizations, datapack changes, and other small scale changes. Larger code changes and experienced developers should not use this guide.

Forking the Mod

To start contributing to a mod on GitHub you need to fork it first. Forking a mod simply creates a copy of the projects code and assets that you can freely modify without directly affecting the original project. This can be done by signing in to GitHub, navigating to the repository page of the project you want to contribute to, and then clicking the Fork button on the top right of the page.

The fork button

Clicking the fork button will bring you to a "Create a new fork" page that allows you to configure your fork before creating it. Make sure the owner is set to your profile and tha

@keiya
keiya / README.md
Last active May 3, 2024 09:59
foobar2000 Accessing UPnP DLNA Example (also Python upnpclient example)

Generate M3U Playlist from foobar2000 UPnP/DLNA Server

I have many songs stored in foobar2000 on Windows, and I wanted to listen to them from other Macs or tablets. foobar2000 mac and foobar2000 mobile seemed suitable for this purpose, but it took a long time to list the songs. So I used this script to create a playlist in advance to save me the trouble.

How to use

  • step 0: create playlist in your foobar2000
  • step 1: install UPnP/DLNA Renderer, Server, Control Point in your foobar2000
    • and make some configuration
  • step 2: install pip packages
@alicekao
alicekao / axiosMockAdapterUse.js
Last active May 3, 2024 09:53
How to use axios mock adapter
// Fetch all places action to test in actions/index.js
import axios from 'axios';
export function fetchPlaces() {
return dispatch => {
return axios.get('/api/places/fetchAll')
.then(resp => {
dispatch(updatePlaces(resp.data));
})
.catch(err => {
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 3, 2024 09:53
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files