Skip to content

Instantly share code, notes, and snippets.

View nascarsayan's full-sized avatar
🌸
Exploring

Sayan Naskar nascarsayan

🌸
Exploring
View GitHub Profile
@amit08255
amit08255 / bspwm.md
Created October 10, 2021 01:52
Bspwm Cheatsheet

bspwm/sxhkd cheat sheet

Common keys

@rjmholt
rjmholt / PowerShellTaskRunner.cs
Last active March 17, 2025 17:43
Examples of how to run PowerShell with a runspace pool and async Tasks
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Reflection;
using System.Threading.Tasks;
/// <summary>
@Debdut
Debdut / Nav.css
Last active April 26, 2020 04:42
Navbar Apple Style
nav {
margin: 0;
overflow: hidden;
background: #333333;
}
.nav-content {
max-width: 1024px;
margin: 0 auto;
padding: 0 20px;
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active March 20, 2025 19:02
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@styblope
styblope / docker-api-port.md
Last active April 17, 2025 12:29
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@andrewiankidd
andrewiankidd / enableWinRM.ps1
Last active June 22, 2021 06:29
Enable WinRM HTTPS via powershell
param ($fqdn)
if ($fqdn -eq $null){
#lots of assuming going on here
$zone = ".westeurope.cloudapp.azure.com"
$fqdn = "$env:computername$zone"
}
##enable winrm
@andypiper
andypiper / basic-recipes.md
Last active September 5, 2022 14:53
Twitter API recipes for twurl +jq, and other useful Twitter code snippets and tools
@thiloplanz
thiloplanz / Zero_knowledge_db.md
Last active March 20, 2025 02:40
Zero-knowledge databases

Zero knowledge databases

The idea

The idea is to provide a database as a service to end users in such a way that no one except the user herself can access the data, not even the hosting provider or the database administrator.

Advantages

  • A privacy- and/or security-conscious user will have more trust in such a setup.
  • The service provider cannot be coerced to release the data they were trusted with, and he cannot be held responsible for the content he is storing.
@openp2pdesign
openp2pdesign / renameillegalfiles.py
Last active June 30, 2021 04:02
Check and rename files with illegal chars
# -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import string
import os
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.