Skip to content

Instantly share code, notes, and snippets.

View fredguth's full-sized avatar

Fred Guth fredguth

  • Brasília, DF, Brazil
View GitHub Profile
@fredguth
fredguth / cuda_installation_on_ubuntu_18.04
Created September 26, 2018 13:09 — forked from Brainiarc7/cuda_installation_on_ubuntu_18.04
cuda 9.0 installation guidline for ubuntu 18.04 LTS
# first get the PPA repository driver
sudo add-apt-repository ppa:graphics-drivers/ppa
# install nvidai driver
sudo apt install nvidia-384 nvidia-384-dev
# install other import packages
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
# CUDA 9 requires gcc 6
@fredguth
fredguth / Install NVIDIA Driver and CUDA.md
Created May 23, 2018 20:12 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS

Keybase proof

I hereby claim:

  • I am fredguth on github.
  • I am fred (https://keybase.io/fred) on keybase.
  • I have a public key whose fingerprint is E857 ADDF 20E1 4B70 9160 59A2 EB5B D737 E4E1 E64B

To claim this, I am signing this object:

@fredguth
fredguth / components.my-component.js
Last active April 8, 2018 14:09 — forked from sglanzer-deprecated/components.my-component.js
Arbitrary properties set via an object hash
import Ember from 'ember';
export default Ember.Component.extend({
notMyInput: Ember.computed('myInput', function() {
return !this.get('myInput')
})
});
function init(m, email, password) {
// generate the database encryption key
vendor.nCrypto
.pbkdf2(
Buffer.from(m.mnemonic, "utf8"),
Buffer.from(databaseKeySeed, "utf8"),
2048,
64,
"sha512"
)
@fredguth
fredguth / Part4 - tutorial.elm
Created January 24, 2016 00:49
Part4: Following Elm Tutorial
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
import Random
import Time exposing (..)
import Signal exposing (foldp)
--Model
@fredguth
fredguth / Part 3 - Tutorial.elm
Created January 19, 2016 17:38
Part 3: Following Elm Tutorial
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
import Time exposing (..)
import Signal exposing (foldp)
--Model
@fredguth
fredguth / tutorial.elm
Last active February 7, 2016 21:35
Part 2: Following Elm tutorial
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
import Time exposing (..)
import Signal exposing (foldp)
--Model
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
relativeMouse : (Int, Int) -> (Int, Int) -> (Int, Int)
relativeMouse (origin_x, origin_y) (x, y) =
(x-origin_x, origin_y - y)
@fredguth
fredguth / gist:57e23770c3d563890154
Created June 20, 2014 15:51
Display Metabox on Post Format
/**
* Show metabox on post format
* @author @fredguth
* @link https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Adding-your-own-show_on-filters
*
* @param bool $display
* @param array $meta_box
* @return bool display metabox
*/
function fg_metabox_show_on_post_format( $display, $meta_box ) {