Skip to content

Instantly share code, notes, and snippets.

View imomaliev's full-sized avatar
🐼

Sardorbek Imomaliev imomaliev

🐼
View GitHub Profile
@edwinlee
edwinlee / Code.gs
Last active March 30, 2025 10:17
Sync a Google Sheets spreadsheet to a Firebase Realtime database
/**
* Copyright 2019 Google LLC.
* SPDX-License-Identifier: Apache-2.0
*/
function getEnvironment() {
var environment = {
spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>",
firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>"
};
@fl64
fl64 / docker-mod.yml
Created April 4, 2019 16:05
Ansible playbook for modifying /etc/docker/daemon.json config (based on https://stackoverflow.com/questions/50796341/add-a-new-key-value-to-a-json-file-using-ansible)
- hosts: all
become: yes
gather_facts: false
vars:
tasks:
- name: Check that the /etc/docker/daemon.json exists
stat:
path: /etc/docker/daemon.json
register: stat_result
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active August 15, 2025 09:09
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@bmaupin
bmaupin / open-source-sso.md
Last active August 13, 2025 23:46
Comparison of some open-source SSO implementations

⚠️ This is not maintained. Feel free to check comments and/or forks for more current options.

Background

This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management

Comparison

(Items in bold indicate possible concerns)

@AndySun25
AndySun25 / polymorphic_related_queryset.py
Last active August 29, 2023 12:53
django-polymorphic select_related monkey patch
@samoshkin
samoshkin / toggle_keybindings.tmux.conf
Last active August 8, 2025 07:36
tmux.conf excerpt to toggle on/off session keybindings and prefix handling
bind -T root F12 \
set prefix None \;\
set key-table off \;\
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 20, 2025 20:17
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

@hynekcer
hynekcer / django_dot_filter.py
Last active November 4, 2020 14:58
Django filters with relational operators and dot to related fields instead of double underscores
from django.db.models import Q
from django.utils import six
class MetaV(type):
# metaclass to automatically create an instance by . dot
def __getattr__(self, name):
if name.startswith('_'):
return super(self, MetaV).__getattr__(name)
else:
@oliveratgithub
oliveratgithub / index.html
Last active April 24, 2025 23:06
Simple, quick & standalone HTML5 responsive placeholder Website. Runs by simply copy-paste the whole code without any additional resource files. It's based on PureCSS.io with jQuery containing a fullstretch-background image plugin and a date-time countdown; kudos to unsplash.it for beautiful placeholder images.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dummy Page</title>
<meta name="description" content="Simple, quick, standalone responsive placeholder Website without any additional resources">
<meta name="author" content="https://gist.github.com/oliveratgithub">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<!--[if lt IE 9]>
@brycemcd
brycemcd / openzoom.zsh
Created December 14, 2016 15:34
Opens a zoom meeting in a browser from the command line
#!/bin/zsh
# Opens a zoom meeting with the name you've given it.
# Drop this script in /usr/local/bin/openzoom
# Invoke with `openzoom meeting_name`
typeset -A meeting
# NOTE: set this hashmap with meeting_name and ids of that meeting
meeting[meeting_name]=123456789