Skip to content

Instantly share code, notes, and snippets.

View miawgogo's full-sized avatar
🐧
Processing Gender, Please Wait

Ceri Loosley miawgogo

🐧
Processing Gender, Please Wait
View GitHub Profile
client: [31] process command "password """
client: [31] command returned 2
client: [31] process command "status"
client: [31] command returned 0
client: [31] process command "stats"
client: [31] command returned 0
client: [31] process command "currentsong"
client: [31] command returned 0
client: [31] process command "status"
@miawgogo
miawgogo / stream problem.md
Last active February 9, 2017 13:40
Problem: MPD hangs after stoping and clearing the playlist after playing a http stream
#audio_output {
# type "pulse"
# name "Main"
# server "localhost" # optional
# sink "localhost" # optional
#}
@miawgogo
miawgogo / Alarm.sh
Last active March 9, 2017 23:45
A script allow a fading in alarm for mpd
#!/bin/bash
server="192.168.1.66"
vol=30
targetvol=100
dovol(){
until [ $vol = $targetvol ]; do
mpc -q -h $server volume $x
sleep 0.5
((x++))
done
@miawgogo
miawgogo / rules.md
Last active July 23, 2020 13:37
Rules and guidelines for the JB unoffical Matrix Room

RULES and stuff

Rules

  • No Drama, Civil disccustion of drama is ok, but flamewars is not allowed.
  • No Polarising politics, well researched debate and comedy is allowed. This boils down to the rule above, No Flamewars
  • Just respect each other and dont be a jerk
  • No NSFW Images due to the fact that matrix shows all images inline at full size. Links must be marked

As per the unspoken JB IRC Rule, the mods will also make it up as they go along if they want, Really it doesnt matter, its just to prevent arguments

17-04-23 22:40:16 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 155, in _async_setup_platform
entity_platform.schedule_add_entities, discovery_info
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 90, in setup_platform
dev.append(NetAtmoSensor(data, module_name, variable))
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 103, in __init__
SENSOR_TYPES[sensor_type][0])
device_tracker:
- platform: owntracks
max_gps_accuracy: 100
- platform: snmp
host: 192.168.1.1
community: public
baseoid: 1.3.6.1.2.1.4.22.1.2
track_new_devices: false
def wiki(info,usrs):
link="https://en.wikipedia.org/w/api.php"
payload = {'action': 'query', 'list': 'search', 'format': 'json', 'srsea$
page = requests.get(link, headers=headers, timeout=5, params=payload)
page.encoding = 'UTF-8'
response = json.loads(page.text)
result = response['query']['search'][0]
url = "https://en.wikipedia.org/wiki/" + result['title'].replace(" ", "_$
msg = "{}: {}... {}".format(result['title'], cleanhtml(result['snippet'].split(".")[0]), url)
say(msg)
[pip]
profile-desc="Shows the video in macosx style picture in picture window, defults to a 320x200 window"
ontop
no-border
on-all-workspaces
autofit=480
geometry=99%:95%
@miawgogo
miawgogo / mastermindloop.c
Created November 14, 2017 16:06
Mastermind
while ((BLACKPEGS(workingCandidate.score) < PEGS) && currentListOfCandidates.indexOfLastEntryAdded >= 0) {
/////your code here
//If (working candidate is not infeasible)
//Generate all 1-step offspring and add to openList
/// loop through pegs
printf("Run");
for(int i = 0; i<4; i++){
/// save old val
int oldval = workingCandidate.variableValues[i];
/// loop throgugh colours