Skip to content

Instantly share code, notes, and snippets.

View tobihans's full-sized avatar
🙃
Keeping it Super Simple !

Hans Bignon K. Tognon tobihans

🙃
Keeping it Super Simple !
View GitHub Profile
@tobihans
tobihans / Video Screen Capture with GStreamer.md
Created August 21, 2023 06:05 — forked from ShannonScott/Video Screen Capture with GStreamer.md
[Video Screen Capture with GStreamer] Capture a Linux desktop window video with gsteramer. #tags: gstreamer, linux, xwindows, video

Capture a video of a given X Window with gstreamer.

X Window ID

Get the target window ID with the following:

xwininfo
@tobihans
tobihans / plink-plonk.js
Created August 14, 2023 17:50 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@tobihans
tobihans / django.view.py
Created March 14, 2023 10:24 — forked from TiagoTi/django.view.py
Django save InMemoryUploadedFile (a temporary uploaded file) to disk
from django.core.files.storage import default_storage
from django.core.files.base import ContentFile
file = request.FILES['your_file_fieldname']
path = default_storage.save('heart_of_the_swarm.txt', ContentFile(file.read()))
#https://twigstechtips.blogspot.com/2012/04/django-how-to-save-inmemoryuploadedfile.html
@tobihans
tobihans / currencies.json
Created February 27, 2023 16:55
IBAN Currencies
[
{
"currency": "Afghani",
"code": "AFN"
},
{
"currency": "Lek",
"code": "ALL"
},
{
@tobihans
tobihans / variousCountryListFormats.js
Created February 17, 2023 10:34 — forked from incredimike/variousCountryListFormats.js
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//
@tobihans
tobihans / publickey-git-error.markdown
Created February 6, 2023 10:14 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@tobihans
tobihans / vim_f_key
Created February 3, 2023 09:55 — forked from jasonngpt/vim_f_key
Vim F key
If you press the "f" key in normal mode, Vim will move the cursor forward to whatever character you input after "f" is pressed. As an example, consider the following line:
a quick brown fox
If the cursor was at the absolute beginning of the line, and you pressed "fb" in normal mode, Vim would move the cursor so that it was positioned over the "b" in "brown".
If you press "F", Vim will move the cursor backwards instead of forward. Given the previous sentence, if pressed "Fq", and the cursor was at the end of the line, it would move to the "q" in "quick".
@tobihans
tobihans / stooge_loader.rb
Created January 15, 2023 14:02 — forked from bowsersenior/stooge_loader.rb
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@tobihans
tobihans / component.vue
Created January 11, 2023 17:38 — forked from Erefor/component.vue
Vue 3 / Options Api Detect outside click
<template>
<div
ref="componentRef"
class="general-style"
>
</div>
</template>
<script>
import useDetectOutsideClick from '/useDetectOutsideClick'