Skip to content

Instantly share code, notes, and snippets.

View genert's full-sized avatar
🌍
Global citizen

G genert

🌍
Global citizen
View GitHub Profile
https://web.tresorit.com/l/j5VvZ#TEi3CmsOVevBvIJoWq9Zrw
@genert
genert / doubly_linked_list.go
Created February 14, 2023 20:04
Linked Lists in Golang
package main
import "fmt"
type Node struct {
Value any
Next *Node
Prev *Node
}
{
"id": "d835f5d5-b3ec-47db-a4b9-0a7db4ac0a2c",
"view_id": "c7880063-110c-45cd-8247-d131fc62c01a",
"collection_id": "f5c6819a-5d75-40a9-ac0b-ca2a3196a7b4",
"workspace_id": "4413dd90-1b8a-4e21-8a75-5b23f72a91f9",
"record_type": "person",
"state": "draft",
"conflict_strategy": "update",
"analysis": null,
"column_mapping": [
/*
* libdatachannel example web server
* Copyright (C) 2020 Lara Mackey
* Copyright (C) 2020 Paul-Louis Ageneau
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
package main
import (
"fmt"
"github.com/mike1808/h264decoder/decoder"
"gocv.io/x/gocv"
// "os"
"net"
)
import React, { useContext, useEffect } from 'react';
import { bindActionCreators, compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { isEqual, get, sortBy, forEach } from 'lodash';
import moment from 'moment';
import { NavConfigContext } from 'components/Nav/Nav';
import Linkify from 'linkifyjs/react';
import {
Button,
@genert
genert / script.js
Created March 29, 2020 12:37
Lumovest - get course total time
function display (seconds) {
const format = val => `0${Math.floor(val)}`.slice(-2)
const hours = seconds / 3600
const minutes = (seconds % 3600) / 60
return [hours, minutes, seconds % 60].map(format).join(':')
}
// The magic
display([...document.querySelectorAll('.lesson-time')].
@genert
genert / ecs_service.tf
Last active February 24, 2020 08:44
Network configuration with Terraform >= 0.12
####################
# MyService
####################
data "aws_ecs_task_definition" "myservice" {
task_definition = "myservice-${var.environment}"
}
resource "aws_ecs_service" "myservice" {
name = "myservice"
cluster = "${var.name}-${var.environment}"
@genert
genert / rand-1-to-max.sql
Created June 22, 2019 09:28
Random Key Value Between 1 and MAX
SELECT b1.*
FROM Bugs AS b1
JOIN (SELECT CEIL(RAND() * (SELECT MAX(bug_id) FROM Bugs)) AS rand_id) AS b2
ON (b1.bug_id = b2.rand_id);
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Startup Name Generator',