Skip to content

Instantly share code, notes, and snippets.

View massens's full-sized avatar

Marc Assens massens

View GitHub Profile
<p>
<script src="https://gist.github.com/<gist_id>.js"> </script>
<noscript>
<pre>
//Your code here
//Be sure you escape your tags with &lt; and &gt; when displaying things like HTML.
</pre>
</noscript>
</p>
@massens
massens / .sh
Last active January 18, 2018 11:13
gcc-dl-setup.sh
# wget -O - -q 'https' | sudo bash
# Cuda
wget -O - -q 'https://gist.githubusercontent.com/allenday/f426e0f146d86bfc3dada06eda55e123/raw/41b6d3bc8ab2dfe1e1d09135851c8f11b8dc8db3/install-cuda.sh' | sudo bash
sudo su
if ! dpkg-query -W cuda; then
# The 16.04 installer works with 16.10.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
@massens
massens / drive_api_ruby_examples.rb
Last active December 7, 2021 10:42
Drive's Ruby API - Things I've learned using the googl-api-ruby-client 0.9 -
#Authentification
#Notice the authorization.refresh!.
def get_drive_service(user)
authorization = Signet::OAuth2::Client.new(
:client_id => 'example',
:client_secret => 'example',
access_token: user.access_token,
refresh_token: user.refresh_token,
token_credential_uri: 'https://www.googleapis.com/oauth2/v3/token')
drive_service = Google::Apis::DriveV3::DriveService.new