Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am wimroose on github.
* I am wroose (https://keybase.io/wroose) on keybase.
* I have a public key ASAHlDnTEYQx4IKWL0JhXN2QmQ66fRsWvuquC9uzIKICHQo
To claim this, I am signing this object:
import zrna
import time
z = zrna.api.Client()
z.connect()
z.clear()
#print(z.endpoints())
osc1 = z.OscillatorSaw(
oscillation_frequency=0.14,
peak_amplitude=1.0
)
class Player:
def __init__(self, _uri):
self.mainloop = GObject.MainLoop()
#Creating the gst pipeline we're going to add elements to and use to play the file
self.pipeline = Gst.Pipeline.new("mypipeline")
#creating the filesrc element, and adding it to the pipeline
self.filesrc = Gst.ElementFactory.make("playbin", "stream")
#self.filesrc.set_property("uri", "http://audio.22tracks.com/128/1413474600-543fe9280ea4a.mp3?st=-BMDl94yWpACmDvv_w88-Q&e=1475094638")
self.filesrc.set_property("uri", _uri)
@WimRoose
WimRoose / New functions to support google migrations api
Last active January 7, 2016 15:50
New functions to be able to use google migrations api
public static com.google.api.services.gmail.model.Message getMessage (String mID, String senderEmail) throws IOException, MessagingException, GeneralSecurityException {
Gmail service = new Gmail.Builder(GoogleNetHttpTransport.newTrustedTransport(), JSON_FACTORY, GinaUtil.getServiceAccCred("wimr@vooruit.be")).setApplicationName(APPLICATION_NAME).build();
// RAW niet vergeten!!
com.google.api.services.gmail.model.Message message = service.users().messages().get(senderEmail, mID).setFormat("raw").execute();
return message;
}
public static HashMap<String, String> migrate(com.google.api.services.gmail.model.Message message, String googleGroup, String subjectTag) throws IOException, MessagingException, GeneralSecurityException {
1) verander /etc/shadow en /etc/shadow- zodat pi kan inloggen met know password
2) disable splash screen mv /etc/init.d/asplash.. asplash_bak
start op
apt-get install openssh-server
apt-get install wpasupplicant
aptitude hold wpasupplicant # zorg dat wpasupplicant niet verwijderd wordt
aptitude hold openssh-server
pas network settings aan
@WimRoose
WimRoose / gist:62b675c56e115e9319df
Last active October 20, 2015 13:54
Eclipse google apps script
Eclipse: -> import -> Google -> google apps script - use default location (dus eerst in workspace)
-> google doorzoekt drive naar app scripts
Eclipse: rechts klikken op project -> team -> share -> selecteer repo
In toolbar: commit (alle files selecteren) + push
## Aanpassingen nu via eclipse; indien per ongeluk of bewust in drive aangepast: force update via rechtsklik op projectniveau -> google -> update apps script from drive. jupla
!!!! wel nog nieuwe versie deployen als app script !!!!
@WimRoose
WimRoose / gist:ba21383c32f502025df0
Last active October 20, 2015 12:06
Eclipse config app engine
> start met nieuwe eclipse & nieuwe workspace
> indien eclipse klaagt op adb en libstdc6: apt-get install lib32stdc++6
> File -> import existing project -> select root folder (check 'copy to workspace')
> bij lib errors: Rechts klik op project -> build paths -> edit build paths
> voor errors ivm com.google.gdt.eclipse.managedapis.MANAGED_API_CONTAINER/drive-v2r181lv1.18.0-rc:
download jars: google "group settings api client for java", extract en voeg jar toe aan war/web-inf/lib dir
> refresh project in eclipse - jars zullen nu ook onder war verschijnen. In edit build paths de jars toevoegen
@WimRoose
WimRoose / gist:d91008cef2757bb148d1
Last active October 27, 2015 20:52
ofxPhoto raspberry pi
> Compile most recent git of libgphoto2
(-> git clone https://github.com/gphoto/libgphoto2
apt-get install libtool
volg instructies op https://github.com/gphoto/libgphoto2/blob/master/INSTALL
> Update ofxPhoto voor openframeworks 0.8.4 en libgphoto
git clone https://github.com/benben/ofxPhoto.git
// verwijder bestaande lib