Skip to content

Instantly share code, notes, and snippets.

💻
I'm probably coding.

Alexander Rössler machinekoder

💻
I'm probably coding.
Block or report user

Report or block machinekoder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@machinekoder
machinekoder / Emacs.kms
Last active Jun 26, 2019
Emacs keys for Qt Creator
View Emacs.kms
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KeyboardMappingScheme>
<!-- Written by Qt Creator 4.2.1, 2017-03-27T21:24:06. -->
<mapping>
<shortcut id="CppTools.OpenHeaderSourceInNextSplit">
<key value="Ctrl+E, F4"/>
</shortcut>
<shortcut id="CppTools.SwitchHeaderSource">
<key value="F4"/>
</shortcut>
@machinekoder
machinekoder / export.py
Created Mar 6, 2017
Pilot-API Pinconfig
View export.py
#!/usr/bin/env python
def exportPin(id):
try:
with open('/sys/class/gpio/export', 'w') as f:
f.write('%i' % id)
except IOError as e:
print(str(e))
try:
View android-publish.py
#!/usr/bin/env python
#
# Copyright 2014 Marta Rodriguez.
#
# Licensed under the Apache License, Version 2.0 (the 'License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@machinekoder
machinekoder / Google Play Api - Apk Upload.md
Last active Sep 3, 2019 — forked from martarodriguezm/Google Play Api - Apk Upload.md
This python script uploads an apk file into Google Play Store using Android Play Publisher API
View Google Play Api - Apk Upload.md

In Google Developer Console inside your app project, on the Credentials section, you must create a new "Service Account" "Client ID", if you have not already. And download the p12 file. You need the service account key file, generated in the Google APIs Console into the same directory and rename it to key.p12.

On Google Play Developer Console you have to give permissions to "YOUR_SERVICE_ACCOUNT_EMAIL@developer.gserviceaccount.com" for uploading apks.

Installation

Download Google APIs Client Library for Python (google-api-python-client): https://code.google.com/p/google-api-python-client/ or use pip:

  $ pip install google-api-python-client
@machinekoder
machinekoder / register.py
Created Jul 4, 2015
Registers a new systemd service
View register.py
#!/usr/bin/python
import subprocess
import shlex
import sys
import argparse
if sys.version_info[0] > 2:
user_input = input
else:
user_input = raw_input
@machinekoder
machinekoder / cos_test.c
Created May 10, 2015
Quick test for timing behavior of cos C function
View cos_test.c
/* Program to demonstrate time taken by function cos() */
#include <stdio.h>
#include <time.h>
#include <math.h>
// The main program calls fun() and measures time taken by fun()
int main()
{
// Calculate the time taken by fun()
clock_t start;
View hal-mode.el
(require 'generic-x)
(define-generic-mode hal-generic-mode
'("#")
(apply 'append
(mapcar #'(lambda (s) (list (upcase s) (downcase s) (capitalize s)))
'("loadrt" "loadusr" "addf" "setp" "sets" "start"
"newpin" "newcomp" "sete"
"newg" "newsig" "ready" "net" "log")))
'(;;("\\(#<_?[A-Za-z0-9_]+>\\)" (1 font-lock-type-face))
@machinekoder
machinekoder / run.py
Created Apr 30, 2015
run.py for axis config
View run.py
#!/usr/bin/python
import sys
import os
import subprocess
import importlib
from machinekit import launcher
from time import *
@machinekoder
machinekoder / coding_style.el
Last active Aug 29, 2015
pycheckers for Emacs
View coding_style.el
;; Setup flymake for Python
(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
View build-protobuf-2.6.1.sh
#!/bin/bash
echo Building Google Protobuf for Mac OS X / iOS.
echo Use 'tail -f build.log' to monitor progress.
(
VERSION=2.6.1
DARWIN_RELEASE=`uname -r`
CORES=`sysctl hw.ncpu | awk '{print $2}'`
#PREFIX=`pwd`/protobuf
You can’t perform that action at this time.