Skip to content

Instantly share code, notes, and snippets.

View florianjs's full-sized avatar
🏠
Working from home

Florian florianjs

🏠
Working from home
View GitHub Profile
@stupidbodo
stupidbodo / csv.go
Last active February 12, 2024 07:05
Golang - Read CSV/JSON from URL
package main
import (
"encoding/csv"
"fmt"
"net/http"
)
func readCSVFromUrl(url string) ([][]string, error) {
resp, err := http.Get(url)
@trevorgreenleaf
trevorgreenleaf / px-rem-tw.csv
Last active April 1, 2024 15:42
PX to REM'S to TAILWIND CSS
PX REM TW
4 0.25 1
8 0.5 2
16 1 4
32 2 8
48 3 12
64 4 16
80 5 20
96 6 24
112 7 28
@yukeehan
yukeehan / app.js
Created July 16, 2018 02:53
Login/Logout/Register using Passport-Local-Mongoose
var express = require("express"),
mongoose = require("mongoose"),
bodyParser = require("body-parser"),
User = require("./models/user"),
passport = require("passport"),
LocalStrategy = require("passport-local"),
passportLocalMongoose = require("passport-local-mongoose");
mongoose.connect("mongodb://localhost:27017/auth_demo_app", { useNewUrlParser: true });
var app = express();
@tspvivek
tspvivek / directus_mover.sh
Last active June 27, 2023 03:09
Directus postgres DB - Script to move schema changes between different servers without replacing data
#!/bin/sh
start=`date +%s.%N`
SRC_CONNECTION_STRING="postgresql://src_username:src_password@src_host/src_dbname"
DST_CONNECTION_STRING="postgresql://dst_username:dst_password@dst_host/dst_dbname"
rm src_schema.sql
rm src_data.sql
rm dst_data.sql