Skip to content

Instantly share code, notes, and snippets.

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@iniyan455
iniyan455 / work manager
Last active April 19, 2024 12:15
Work Manager Understanding
Work Manager
WorkManager is an API that makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts. The WorkManager API is a suitable and recommended replacement for all previous Android background scheduling APIs
Device support from 14 -22 it will work on alarm manager with broadcast to process scheduling and GCM NetworkManager
Device above 23 + all uses JobSchedular
usecases :
Dynamic Feature modules and clean architecture
Backup chat like whatsapp after a hours or 1 in a day
update news in any news app - phone in charge or connect with constraint and executes the task and impl
@frosit
frosit / infectedFiles.md
Created May 5, 2016 22:40
Some commands for finding and clearing infected PHP files

Finding infected files with following bash commands

** Command to list all infected files:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot
  • grep -lr --include=*.php "eval" .
  • grep -lr --include=*.php "base64" .

Command to remove malicious code:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g'
@isti115
isti115 / gamepad-control.py
Created June 19, 2020 20:10
Proof of concept blender addon for controlling the viewport with a gamepad (evdev python module needed, only tested under linux)
bl_info = {
"name" : "Gamepad Control",
"author" : "István Donkó",
"description" : "Control the blender viewport using a gamepad",
"blender" : (2, 80, 1),
# "location" : "View3D",
"category" : "Generic"
}
import bpy
@atimb
atimb / LICENSE.txt
Created December 8, 2011 23:32 — forked from 140bytes/LICENSE.txt
Snake game in 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Attila Incze <http://atimb.me>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ramonsmits
ramonsmits / Move-MsmqMessages.ps1
Last active April 19, 2024 12:11
Powershell script to move MSMQ messages between queues with support for transactions and partial sets based on size.
<#
.SYNOPSIS
Moves messages between queues.
.DESCRIPTION
Moves messages between queues, move isn't really the right word as moving can only occur
between a queue and its sub-queues but its the Verb allowed by Powershell.
Is allows moving messages between queues of different transaction type.
@qoomon
qoomon / conventional_commit_messages.md
Last active April 19, 2024 12:10
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@scyto
scyto / proxmox.md
Last active April 19, 2024 12:10
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@StevenACoffman
StevenACoffman / https-during-dev.macos.sh
Last active April 19, 2024 12:09 — forked from disintegrator/https-during-dev.macos.sh
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
brew install caddy mkcert nss dnsmasq
mkcert -install
# test could be anything
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {
@fedir
fedir / golang.bashrc
Last active April 19, 2024 12:06
Go (Golang) installation and path configuration for Ubuntu / Debian / Linux Mint / ...
export GOROOT=/usr/local/go
export PATH=${GOROOT}/bin:${PATH}
export GOPATH=$HOME/go
export PATH=${GOPATH}/bin:${PATH}