Skip to content

Instantly share code, notes, and snippets.

View scmanjarrez's full-sized avatar
🧠
hungry mind

Sergio C scmanjarrez

🧠
hungry mind
  • Spanish National Research Council (CSIC)
  • Madrid
View GitHub Profile
@scmanjarrez
scmanjarrez / efi_boot.bat
Last active June 13, 2018 10:45
Change efi boot order
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
REM bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi
REM bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi
scrollbar, scrollbar *, scrollcorner {
-moz-appearance: none !important;
--scrollbar-width: 10px;
--scrollbar-height: var(--scrollbar-width);
}
scrollbar, scrollcorner {
background: #282828 !important;
}
scrollbar[orient="vertical"] {
@scmanjarrez
scmanjarrez / fkucortana.ps
Created August 17, 2019 19:34
fix the f***ng cortana index problem resulting in best match not clickable
Get-AppXPackage -Name Microsoft.Windows.Cortana | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
@scmanjarrez
scmanjarrez / tmux-migrate-options.py
Created October 10, 2019 16:07 — forked from tbutts/tmux-migrate-options.py
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@scmanjarrez
scmanjarrez / guake2iterm.sh
Last active August 2, 2020 12:17
Convert guake current theme to iterm theme.
#!/bin/bash
while getopts ":o:" opt; do
case ${opt} in
o) output=$OPTARG ;;
esac
done
if [ -z "$output" ]; then
echo "Usage: $0 -o output_file"
@scmanjarrez
scmanjarrez / route.sh
Last active February 16, 2021 09:49
fix routing (ssh) when connected to openvpn
# https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client
# https://serverfault.com/a/660106
ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev ethX
ip route add table 128 default via z.z.z.z
# Where x.x.x.x is your public IP, y.y.y.y/y should be the subnet
# of your public IP address, ethX should be your public Ethernet
# interface, and z.z.z.z should be the default gateway.
# Note that this hasn't worked for me (using Debian and PrivateInternetAccess)
@scmanjarrez
scmanjarrez / userChrome.css
Last active August 13, 2021 13:31
firefox context menu and tab context menu css for linux http://imgur.com/fv4L3Cwl.png
menupopup {
--panel-background: var(--arrowpanel-background) !important;
--panel-color: var(--arrowpanel-color) !important;
--panel-border-color: var(--arrowpanel-border-color) !important;
--panel-border-radius: var(--arrowpanel-border-radius) !important;
--panel-padding: var(--arrowpanel-padding) !important;
}
menuseparator {
appearance: inherit !important;
@scmanjarrez
scmanjarrez / resin.py
Last active December 2, 2023 02:01
genshin resin api
import hashlib
import time
import random
import string
import requests as req
salt = "6cqshh5dhw73bzxn20oexa9k516chk7s" # borrowed from https://github.com/thesadru/genshinstats
uid = 12345678 # int
ltoken = "verylargestringtokenxxxxxxxxxxxxxxxxxxx" # str
ltuid = "87654321" # str
@scmanjarrez
scmanjarrez / main.py
Created February 15, 2022 18:28 — forked from keithel/main.py
Access a ChartView's series in QML imperatively
from pathlib import Path
import sys
from PySide6.QtCore import QUrl, QObject, Property, Signal, Slot
from PySide6.QtWidgets import QApplication
from PySide6.QtQml import QmlElement, QQmlApplicationEngine
from PySide6.QtCharts import QAbstractSeries
QML_IMPORT_NAME = "name.kyzivat.piechart_example"
QML_IMPORT_MAJOR_VERSION = 1
@scmanjarrez
scmanjarrez / README.md
Last active April 7, 2022 22:01
Export threejs json to stl (used with thigiverse js models: example: https://cdn.thingiverse.com/threejs_json/16/3f/4e/a9/e6/large.js)