Skip to content

Instantly share code, notes, and snippets.

View tur1ngb0x's full-sized avatar
🎯
Focusing

tur1ngb0x tur1ngb0x

🎯
Focusing
  • 21:03 (UTC +05:30)
View GitHub Profile
@maelvls
maelvls / README.md
Last active July 22, 2024 08:44
Ubuntu, libsecret, git-credential-helper

Dealing with secrets

GNOME comes with libsecret. You can use libsecret to store your git credentials:

sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
@selimslab
selimslab / get_gists.py
Last active December 23, 2023 15:52 — forked from leoloobeek/get_gists.py
Download all gists of a user
import sys
from subprocess import call
import json
import os
import requests
def download_gists(gists: list):
for gist in gists:
call(["git", "clone", gist["git_pull_url"]])
@Velocet
Velocet / Unlock-PowerCfg.ps1
Last active July 15, 2024 23:05
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
@corbindavenport
corbindavenport / setup.sh
Last active May 14, 2024 08:09
My personal setup script for KDE Neon
# This is designed for KDE Neon
# To run this:
# bash <(curl -s https://gist.githubusercontent.com/corbindavenport/9e164da69ab9de884dfbb6ef9c29a5aa/raw/setup.sh)
# Set device hostname and get sudo
sudo echo "Set the name for this device (no spaces!):"
read hostname
hostnamectl set-hostname $hostname
# Update packages
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active July 18, 2024 22:51
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@mlocati
mlocati / win10colors.cmd
Last active July 13, 2024 05:06
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@fvdnabee
fvdnabee / setdisplays.sh
Created April 9, 2016 23:33
Shell script with xrandr for configuring displays at home or at work
#!/bin/sh
# This script will automatically configure my screen outputs depending on the
# outputs that are detected as connected by xrandr
# if both VGA1 and HDMI1 connected -> HDMI1 left of VGA1
# else if HMD1 connected and VGA1 not connected -> HDMI1 above internal display
# else -> just use internal display
if (xrandr | grep "HDMI1 connected") && (xrandr | grep "VGA1 connected"); then
# turn off internal screen:
xrandr --output LVDS1 --off
xrandr --output VGA1 --auto
@natefoo
natefoo / 00README.md
Last active July 20, 2024 07:25
Linux Distribution Detection

Distribution Detection

I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.

How you can help

If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:

  • The contents of /etc/os-release, if it exists