Skip to content

Instantly share code, notes, and snippets.

View hsaputra's full-sized avatar

Henry Saputra hsaputra

View GitHub Profile
@hsaputra
hsaputra / gist:ef096819df433834b28da8cbd3beded3
Created September 14, 2017 23:14
GPU NVIDIA remove nouveau driver
remove all nvidia packages ,skip this if your system is fresh installed
sudo apt-get remove nvidia* && sudo apt autoremove
install some packages for build kernel:
sudo apt-get install dkms build-essential linux-headers-generic
now block and disable nouveau kernel driver:
sudo vim /etc/modprobe.d/blacklist.conf
Insert follow lines to the blacklist.conf:
Kubernetes local deployment
https://www.sebastien-han.fr/blog/2015/07/01/build-kubernetes-from-source/
@hsaputra
hsaputra / gist:21049405a273bb04e964f83250ea9b28
Last active September 20, 2017 17:08
Kubernetes Device Plugin and Resource links
https://github.com/kubernetes/community/blob/58b1c30d95719749068497ba35dfe4c64b21aa72/contributors/design-proposals/resource-management/device-plugin.md
https://github.com/kubernetes/community/pull/844
https://github.com/kubernetes/kubernetes/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Aclosed%20device%20plugin
Multiple GPUs:
https://github.com/kubernetes/kubernetes/pull/42116
@hsaputra
hsaputra / gist:63d88545c4055c8375bf432e67ef0b72
Created September 21, 2017 19:20
Build Kubernetes from source
https://www.sebastien-han.fr/blog/2015/07/01/build-kubernetes-from-source/
https://kubernetes-v1-4.github.io/docs/getting-started-guides/locally/
@hsaputra
hsaputra / gist:0bb3f2727d8e679f3f7c2ce4677a4425
Created September 22, 2017 17:26
PR for example of K8S Device Plugin
RedHat for Solarflare (a NIC)
https://github.com/vikaschoudhary16/kubernetes/pull/7
@hsaputra
hsaputra / gist:414106aafd75eb143025570905c8972c
Last active September 22, 2017 23:08
Example Device Plugin
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/deviceplugin/device_plugin_stub.go
https://github.com/GoogleCloudPlatform/container-engine-accelerators/blob/master/cmd/nvidia_gpu/nvidia_gpu.go
https://github.com/vikaschoudhary16/kubernetes/pull/7/files

Keybase proof

I hereby claim:

  • I am hsaputra on github.
  • I am hsaputra (https://keybase.io/hsaputra) on keybase.
  • I have a public key ASD0idJfHyDoq7izryOpBTVGgE3glrToRwSe5Y6gkQsbYgo

To claim this, I am signing this object:

/**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/
class Solution {
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
@hsaputra
hsaputra / gist:fea6a827cb022c14ac836a44429f7006
Last active October 9, 2018 04:02
Phone number combo - interview
class Solution {
public List<String> letterCombinations(String digits) {
if (digits == null || digits.length() == 0)
return new LinkedList<String>();
// local vars
Map<Integer, String> digitsToChars = new HashMap<Integer, String>();
digitsToChars.put(0, "");
digitsToChars.put(1, "");
class Solution {
public List<List<Integer>> threeSum(int[] nums) {
// test cases
// nums invalid
// no duplicates
// sums to zero
// Eg: [-1,0,1,2,-1,-4]