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
#!/bin/bash
wget -O 10_resume_wifi https://gist.githubusercontent.com/ioangogo/389f0ff730e3c7a97351b2de3a629352/raw/55976b1c36a9ce06efc035097525ef13189b75c2/10_resume_wifi
read -p "Do you want to read the bash script that has just being downloaded and run it:[Y/N] " yn
case $yn in
[Yy]* ) nano 10_resume_wifi;;
[Nn]* ) echo "OK Its your system";;
esac
sudo bash -c "mv 10_resume_wifi /etc/pm/sleep.d/10_resume_wifi"
sudo bash -c "chmod +x /etc/pm/sleep.d/10_resume_wifi"
if e.code == 404:
say("Bitcoin Average does not have any data on that currency")
elif e.code == 500:
say("bitcoinaverage.com had a server error")
else:
say("I got a " + str(e.code) + " from the server")
@miawgogo
miawgogo / Fix.css
Last active August 25, 2016 22:09
there fixed
/*Put this in the child theme or what ever your using's css*/
#videoembed a {
color: whitesmoke;
}
@miawgogo
miawgogo / alarm.py
Created September 21, 2016 20:33
simple python alarm clock
# A simple python alarm clock
# example: python alarm.py [time in 24h with :] [music file]
# example: python alarm.py "6:30" "Trollenn.mp3"
import time, os, sys
ctime = time.strftime("%H:%M")
print(ctime)
while ctime != sys.argv[1]:
ctime = time.strftime("%H,%M")
@miawgogo
miawgogo / randombsd.py
Created September 27, 2016 12:15
Selects a random BSD now episode from the RSS Feed
import feedparser, random, os
d = feedparser.parse("https://feeds.feedburner.com/BsdNowMp3")
episodes = d.entries
show = random.choice(episodes).enclosures[0]
os.system("mpv " + show['href'])
Elsa
Do you want to be a coder?
Come on lets go and code
I never see your commit anymore
Come out the door
It's like you've have no coffee...
We used to have good streeks
But now we dont
I wish you would tell me why!
Traceback (most recent call last):
File "openlp\core\lib\mediamanageritem.py", line 462, in on_double_clicked
File "openlp\core\lib\mediamanageritem.py", line 484, in on_preview_click
File "openlp\core\lib\mediamanageritem.py", line 618, in build_service_item
File "openlp\plugins\songs\lib\mediaitem.py", line 469, in generate_slide_data
File "openlp\plugins\songs\lib\openlyricsxml.py", line 272, in song_to_xml
AttributeError: 'NoneType' object has no attribute 'name'
int meter = 11; // blue LED in Digital Pin 9 (PWM)
int old = 0;
void setup(){
Serial.begin(9600);
pinMode(meter,OUTPUT); // tell arduino it's an output
// test and set all the outputs to low
digitalWrite(meter,LOW);
}
void loop(){

Problem: The connection to alsa fails when playing any jupiter broadcasting audio file, ogg or non ogg, this only happens when playing audio to the pi-dac+ over its I2S intiface but not when using the usb dac i have. Other files play fine

MPD config

Log part that i am intrested in when playing the JB ogg:

client: [0] command returned 1
client: [0] process command "pause "0""
alsa_output: opened default:CARD=IQaudIODAC type=PLUG
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory "smb://192.168.1.11/Mediadrive/Media Files/Mp3"
#