Skip to content

Instantly share code, notes, and snippets.

View priom's full-sized avatar
:octocat:
Building Web3.0

Priom Chowdhury priom

:octocat:
Building Web3.0
View GitHub Profile
@priom
priom / filecoin_lotus_setup.sh
Last active July 15, 2021 21:36
Filecoin Lotus Setup Ubuntu 20.04
#!/bin/bash
sudo apt update -y \
sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget curl make htop -y \
sudo apt upgrade -y \
sh -c "$(curl -fsSL https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh)" \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && source "$HOME/.cargo/env" \
wget -c https://golang.org/dl/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local \
export PATH="$PATH:/usr/local/go/bin" >> "$HOME/.profile" && source "$HOME/.profile" \
git clone https://github.com/filecoin-project/lotus.git \
cd lotus/ \
@priom
priom / Installation.md
Created May 14, 2019 01:45 — forked from albertbori/Installation.md
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
provider "google" {
credentials = "${file("credentials.json")}"
project = "ENTER_YOUR_PROJECT_ID_HERE"
}
resource "google_compute_instance" "name" {
name = "ENTER_YOUR_INSTANCE_NAME_HERE",
zone = "us-east1-b",
machine_type = "n1-standard-1",
min_cpu_platform = "Intel Skylake"
@priom
priom / application.html.erb
Created March 24, 2017 03:31 — forked from the-bass/application.html.erb
Using Google Analytics with Rails 5 and Turbolinks 5. This code is taken from the conversation between @preetpalS and @packagethief on https://github.com/turbolinks/turbolinks/issues/73.
<%# Put this code snippet between the <head></head>-tags in your application layout and %>
<%# replace 'UA-XXXXXXXX-X' with your own unique Google Analytics Tracking ID %>
<%# ... %>
<head>
<%# ... %>
<% if Rails.env.production? %>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),