Skip to content

Instantly share code, notes, and snippets.

@agmm
agmm / nextjs-file-upload-api.js
Created January 31, 2020 23:03
Simple Nextjs File Upload — Backend API
// Backend
import formidable from 'formidable';
export const config = {
api: {
bodyParser: false,
},
};
export default async (req, res) => {
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 21:31
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@marcofischer
marcofischer / .gitlab-ci.yml
Last active March 10, 2017 08:16
SFUG CGN Links
before_script:
- which bats
stages:
- build
- test
- deploy
- cleanup
docker_build_container:
@aurimasniekis
aurimasniekis / array_value_type_validation.php
Created January 24, 2016 20:36
PHP Array value type validation as function argument
<?php
class A
{
}
class First
{
protected $collection;
@rochacbruno
rochacbruno / ACCESS_ELASTIC.md
Last active May 3, 2024 19:15
Docker-compose wait-to-start

When unsing docker compose you can have a problem with the order of dependent linked containers

The solution is to start a script which tries to access a service and waits until it gets ready before loading your program

@tadast
tadast / countries_codes_and_coordinates.csv
Last active May 8, 2024 01:21
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Åland Islands AX ALA 248 60.116667 19.9
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
@chluehr
chluehr / oxid_modules_off.sql
Created October 9, 2013 17:47
Disable OXID modules
DELETE FROM oxconfig WHERE oxvarname IN ("aDisabledModules", "aLegacyModules",
"aModuleFiles", "aModulePaths", "aModules", "aModuleTemplates");
@chillu
chillu / - howto-travis-silverstripe.md
Last active December 15, 2015 12:48
Howto: Continuous Integration for SilverStripe Modules with Travis and Composer