Skip to content

Instantly share code, notes, and snippets.

View alvesvaren's full-sized avatar

Alve Svarén alvesvaren

View GitHub Profile
import keyboard, soco, time
from win32api import GetKeyState
from win32con import VK_SCROLL
trigger = 77
speaker_name = 'Example'
while True:
try:
player = soco.discovery.by_name(speaker_name)
break
except Exception:
@alvesvaren
alvesvaren / godaddy_ddns.py
Created August 4, 2018 10:36
A python script to set godaddy dns server to your ip, schedule this to run periodically.
import requests
import json
# This script is used to check and update your GoDaddy DNS server to the IP address of your current internet connection.
# First go to GoDaddy developer site to create a developer account and get your key and secret
# https://developer.godaddy.com/getstarted
# Update the first 4 varriables with your information
# This is a script rewrited to python from powershell, original script is available at https://github.com/markafox/GoDaddy_Powershell_DDNS
domain = 'domain name'
name = 'subdomain name'
" VIM CONFIG
set nu
execute pathogen#infect()
colorscheme dracula
" sudo write
" ##############..... ##############
" ##############......##############
" ##########..........##########
" ##########........##########
" ##########.......##########
" ##########.....##########..
" ##########....##########.....
" ..##########..##########.........
" ....##########.#########.............
" ..################JJJ............
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
@alvesvaren
alvesvaren / library.c
Created November 28, 2020 18:53
Run C code from python
#include <stdio.h>
void say(char* message)
{
printf(message);
printf("\n");
}
int sum(int num1, int num2) {
return num1 + num2;
@alvesvaren
alvesvaren / updatefans.sh
Last active November 4, 2023 18:20 — forked from fragtion/fanspeeds.sh
Dell R710 (and possibly other) temperature-based fan speeds script
#!/bin/bash
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed too high send the raw IPMI command to enable dynamic fan control.
#
# Also get CPU temps from lm-sensors and adjust fan speeds according to defined
# speed % which should be set according to your needs (each CPU model will vary)
#
# Requires:
# ipmitool – apt install ipmitool
@alvesvaren
alvesvaren / auto-cert.sh
Last active November 5, 2021 17:28
install wings
#!/bin/bash
apt-get update && apt-get install -y certbot
certbot certonly --standalone --email $EMAIL -nd $DOMAIN
@alvesvaren
alvesvaren / README.md
Last active April 19, 2022 06:50
Python 3 script to convert Dashlane csv-export to Bitwarden importable csv

Dashlane web export to bitwarden vault

I have only tested it on linux but it should work on windows+macos too.

To use:

  1. Make sure python 3 is installed
  2. Export the data from dashlane by visiting the web app, then pressing "My account" > "Settings" > "Export Data"
  3. Unzip the .zip-file downloaded from dashlane
  4. Download this script and put it in the same folder as the unzipped dashlane files
  5. Open a terminal in the folder where the csv-file is located