Skip to content

Instantly share code, notes, and snippets.

@smashnet
smashnet / senec.py
Last active December 19, 2023 12:31
Library to get a lot of useful data out of Senec appliances.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Library to get a lot of useful data out of Senec appliances.
Tested with: SENEC.Home V3 hybrid duo
Kudos:
* SYSTEM_STATE_NAME taken from https://github.com/mchwalisz/pysenec
anonymous
anonymous / bcselfservices.properties
Created November 11, 2017 18:12
db navigator configuration files
item.1.title.de=bahn.bonus
item.1.title.en=bahn.bonus
item.1.summary.de=Teilnahme am bahn.bonus-Programm
item.1.summary.en=Participation bahn.bonus
item.1.img=app_img1_bahnbonus.png
item.1.credentials=true
item.1.content=sc=bbanm
item.1.techname=bbanm
item.2.title.de=Punktestand
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@elyase
elyase / install.md
Last active August 15, 2020 11:37
ibsimu installation on osx

Tested on ibsimu-1.0.6dev, OSX Yosemite, High Sierra, Catalina.

Install homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install dependencies

brew install autoconf automake libtool gtk+3 gsl

@tehlers
tehlers / gradle.sh
Created May 27, 2015 07:42
This script will execute the Gradle wrapper, if it is available in the current or a parent directory. Otherwise it will fall back to start the Gradle version found in $PATH. The intended way to use this script is as an alias for 'gradle'.
#! /usr/bin/env bash
#
# This script will execute the Gradle wrapper, if it is available in the current
# or a parent directory. Otherwise it will fall back to start the Gradle version
# found in $PATH.
#
# The intended way to use this script is as an alias for 'gradle'.
#
@edenwaith
edenwaith / git-branch-batch-rename
Created February 9, 2015 17:27
Rename multiple git branches from the command line
git branch | grep defects | awk '{original=$1; sub("defects","old-defects"); print original, $1}' | xargs -n 2 git branch -m
anonymous
anonymous / syncs.d
Created February 9, 2015 00:02
#!/usr/sbin/dtrace -q -s
/*
Overly spammy, mostly covered by the other probes (every "read" or "write" is a "request")
CFPreferencesServer$target:::request {
printf("REQUEST from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, walltimestamp, copyinstr(arg1) != NULL ? copyinstr(arg1) : "(NULL)" ?: "(NULL)", copyinstr(arg2) != NULL ? copyinstr(arg2) : "(NULL)", copyinstr(arg3) != NULL ? copyinstr(arg3) : "(NULL)", copyinstr(arg4) != NULL ? copyinstr(arg4) : "(NULL)", arg5);
}
*/
CFPreferencesServer$target:::write_rejected {
printf("REJECTED WRITE OF KEY %s request from pid %d for reason %s at %Y ( domain: %s, user: %s, host: %s, container: %s)\n", copyinstr(arg1) != NULL ? copyinstr(arg1) : "(NULL)", arg0, copyinstr(arg6) != NULL ? copyinstr(arg6) : "(NULL)", walltimestamp, copyinstr(arg2) != NULL ? copyinstr(arg2) : "(NULL)", copyinstr(arg3) != NULL ? copyinstr(arg3) : "(NULL)", copyinstr(arg4) != NULL ? copyinstr(arg4) : "(NULL)", copyinstr(arg5) != NULL ? copyinstr(arg5)
@arnekolja
arnekolja / MyController.php
Created January 10, 2015 19:05
TYPO3, Extbase: Simple JsonView usage
<?php
/* This is tested with 6.2.9 only */
namespace MY\Extension\Controller;
class MyController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
private $ajaxPageType = 133799;
/**
@jbafford
jbafford / gist:d91ac15cf79a22e70f65
Created August 4, 2014 21:03
List OSX codesign versions for installed apps
find /Applications ~/Applications -maxdepth 3 -name "*.app" | while read a ; do echo; echo -n "$a ___ "; codesign -vd "${a}" 2>&1 | awk '/version/ {print $3}'; done | awk -F'___' '{print $2 " " $1}' | sort -u
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.