Skip to content

Instantly share code, notes, and snippets.

Sam SamR1

Block or report user

Report or block SamR1

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
davlgd /
Created Jul 30, 2019
Raspberry Pi SoC monitoring script
# -*- coding: utf-8 -*-
import os
import csv
import time
delay = 2
csv_file = "pi_soc_results.csv"
mauri870 /
Last active Nov 15, 2019
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
MaxenceCauderlier / Tpl.php
Created Feb 12, 2017
Simple PHP Template Engine
View Tpl.php
class Tpl
/** @var string Chemin du template */
protected $filepath;
/** @var string Contenu du template */
protected $filecontent;
makevoid / geth_mine.js
Last active Oct 16, 2016
Geth mining script, run as last argument of geth via `js geth_mine.js` - source:
View geth_mine.js
// fork of mine.js script on embark-framework, this script mines only if there are new transactions in the pool
var eth, config, main, pendingTransactions, startTransactionMining;
eth = web3.eth;
console.log('geth_mine.js: start');
console.log("node infos: " + (JSON.stringify(admin.nodeInfo)));
config = {
threads: 2 // set this to the number of threads you machine can handle, remember to set a low difficulty in your genesis block to mine faster
gokulkrishh / media-query.css
Last active Nov 16, 2019
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
niksumeiko / git.migrate
Last active Nov 16, 2019
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
danielthiel /
Last active Nov 13, 2019
SQLAlchemy: filter by date for an datetime field(does not work with SQLite, with PostgreSQL it works fine)
from datetime import date
from sqlalchemy import cast, DATE
Match.query.filter(cast(Match.date_time_field, DATE)
synox / install SonarQube on Raspberry Pi
Last active Oct 9, 2019
How to install SonarQube on Raspberry PI
View install SonarQube on Raspberry Pi
SonarQube does currently not support Raspberry PI.
This is a workaround. It compiles a armv6 compatible version of the java-wrapper and configures sonarqube to use it.
(Testet with Raspbian, wheezy, 3.6)
Compile java-wrapper for ARMv6
Download latest version of " wrapper_prerelease_XY.tar" from (for me 3.5.17 works)
vgoklani /
Last active Oct 8, 2019
Using Flask to output Python data to High Charts
from flask import Flask, render_template
app = Flask(__name__)
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350):
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,}
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}]
title = {"text": 'My Title'}
richard-flosi /
Created Sep 26, 2012
Bottle with Cross-origin resource sharing (CORS)
Example of setting up CORS with
from bottle import Bottle, request, response, run
app = Bottle()
def enable_cors():
You can’t perform that action at this time.