Skip to content

Instantly share code, notes, and snippets.

View ilomon10's full-sized avatar
🐢
keep a beloved undangon - stay tuned!

Imanuel Pundoko ilomon10

🐢
keep a beloved undangon - stay tuned!
  • manjo
  • Manado, Sulawesi Utara, Indonesia
  • X @ilomon10
View GitHub Profile
## Sep 2023 update: We've released official support for MediaPipe on Raspberry Pi.
## It provides many more features to what's available in TFLite Task Library. The guide
## below has been updated to use MediaPipe instead of TFLite Task Library.
## Check out this blog post to learn more:
## https://developers.googleblog.com/2023/08/mediapipe-for-raspberry-pi-and-ios.html
# Show your Raspberry Pi OS version.
cat /etc/os-release
# Update packages on your Raspberry Pi OS.
@max10rogerio
max10rogerio / slugify.ts
Last active May 25, 2024 15:58
Typescript slug function
// MIT License
// Copyright (c) 2023 Max Rogério
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@hillkim7
hillkim7 / resample2.js
Last active July 10, 2023 01:35
It shows how to resample time series data within javascript.
// This code show how to resample dataframe within javascript.
// It is based on the following link:
// https://gist.github.com/edouardswiac/0782cfb1fc66aba6b0ffca06c01c03b2
var moment = require('moment')
// our time precision
let timeUnit = 'minute'
let startTime = moment().startOf(timeUnit)
@talyguryn
talyguryn / wildcard-ssl-certificate.md
Last active October 29, 2023 08:57
How to get a wildcard ssl certificate and set up Nginx.

How to get and install a wildcard SSL certificate

In this guide you can find how to resolve the following issues.

Feel free to ask any questions in the comments section below.

@jeffjohnson9046
jeffjohnson9046 / kill-all-connections-to-db.sql
Created June 18, 2018 18:10
How to kill all connections to a Postgres database
-- Accepted answer from here: https://stackoverflow.com/questions/5408156/how-to-drop-a-postgresql-database-if-there-are-active-connections-to-it
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = '[your database name goes here]'
AND pid <> pg_backend_pid();
@Xananax
Xananax / TextFit.tsx
Created February 11, 2018 11:34
React Element for fitty.js
import * as React from 'react'
import { Component } from 'react'
import fitty, { Options, Fitted } from 'fitty'
export type Props = Partial<Options> & {text?:string} & React.AllHTMLAttributes<HTMLSpanElement>
export const style =
{ display: `inline-block`
, whiteSpace: `nowrap`
}
@Kaundur
Kaundur / canvasDownload.js
Created June 8, 2017 07:25
JS to automatically download canvas as a png
// This code will automatically save the current canvas as a .png file.
// Its useful as it can be placed in a loop to grab multiple canvas frames, I use it to create thumbnail gifs for my blog
// Only seems to work with Chrome
// Get the canvas
var canvas = document.getElementById("canvas");
// Convert the canvas to data
var image = canvas.toDataURL();
// Create a link
var aDownloadLink = document.createElement('a');
@rodrigobaron
rodrigobaron / install-opencv.sh
Last active April 21, 2023 18:51
Install OpenCV on Ubuntu or Debian
# SOURCE: (milq) https://github.com/milq/scripts-ubuntu-debian/blob/master/install-opencv.sh
# also http://milq.github.io/install-opencv-ubuntu-debian/
# KEEP UBUNTU OR DEBIAN UP TO DATE
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
@sid24rane
sid24rane / net.js
Last active May 19, 2024 07:28
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
var net = require('net');
// creates the server
var server = net.createServer();
//emitted when server closes ...not emitted until all connections closes.
server.on('close',function(){
console.log('Server closed !');
});
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;