Skip to content

Instantly share code, notes, and snippets.

@chamrc
chamrc / AdobeAMDFix.md
Created July 14, 2020 02:44 — forked from naveenkrdy/AdobeAMDFix.md
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password if asked).

{
"description": "Little Snitch Blacklist",
"name": "Little Snitch Blacklist",
"rules": [
{
"action": "deny",
"notes": "",
"process": "any",
"remote-domains": "app-measurement.com"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-get update
sudo apt-get install -y cuda nvidia-cuda-toolkit
@chamrc
chamrc / Install NVIDIA Driver and CUDA.md
Created April 11, 2018 14:22 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
name: "Convolutional Neural Network"
input: "Images (1000x1x28x28)"
input_dim: 1000
input_dim: 3
input_dim: 28
input_dim: 28
layer {
bottom: "Images (1000x1x28x28)"
top: "Conv2d (1000x64x28x28)"
name: "Multiple Layer Perceptrons"
layer {
name: "Image (1000 x 28 x 28)"
type: "MemoryData"
top: "data"
top: "label"
memory_data_param {
batch_size: 1000
channels: 1
height: 28
@chamrc
chamrc / gist:4996c28cdca22b11ab5fec65a1434a51
Last active March 29, 2018 22:44
Medical Image Caffe File using ResNet 152
name: "ResNet-152"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 256
input_dim: 256
layer {
bottom: "data"
top: "conv1"

Set rz and sz on Mac

There are a mess of troubles in sending and receiving files from my macbook to dev server, since I had no permission to excute command scp on dev server. Here is a lightweight, quick, and convenience tools which related with ssh, called lrzsz. lrzsz is a unix communication package providing the XMODEM, YMODEM, ZMODEM file transefer protocol which usually has been already installed in most of servers.

Prerequisites

  • iTerm2 is necessary. [Here][] is the official website.
@chamrc
chamrc / * - pdf
Created October 18, 2017 08:56 — forked from larryxiao/* - pdf
extract text from pdf then remove unnecessary characters change '\n' into '||' change \f' into ' '
libreoffice --convert-to pdf *.ppt
libreoffice --headless --convert-to pdf *.ppt
# This script may use ~8 MiB Memory, it is fast and safe
def find_IP(dns_ser, domain, timeout = 2):
import dns.resolver, sys
try:
T = dns.resolver.Resolver(); T.nameservers = [dns_ser, ]; T.timeout = T.lifetime = timeout
answers = T.query(domain, raise_on_no_answer=False)
return [rdata for rdata in answers]
except Exception as e:
if e.__class__.__base__ == dns.exception.DNSException: