Skip to content

Instantly share code, notes, and snippets.

View abelardojarab's full-sized avatar

Abelardo Jara-Berrocal abelardojarab

View GitHub Profile
@abelardojarab
abelardojarab / osx_automount_nfs.md
Created April 13, 2018 21:50 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@abelardojarab
abelardojarab / .cshrc
Created October 16, 2019 20:07 — forked from BenderIsMyGod/.cshrc
Tcsh / csh fancy shell prompt with date, color and more
# $FreeBSD: releng/10.3/etc/root/dot.cshrc 243893 2012-12-05 13:56:39Z eadler $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
# more examples available at /usr/share/examples/csh/
#
alias h history 25
alias j jobs -l
@abelardojarab
abelardojarab / teamcity-agent.service
Created October 23, 2019 21:07 — forked from BenWhitehead/teamcity-agent.service
systemd service files for running TeamCity (create in /usr/lib/systemd/system)
[Unit]
Description=TeamCity Build Agent
After=network.target
[Service]
Type=forking
PIDFile=$AGENT_HOME/logs/buildAgent.pid
ExecStart=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh start
ExecStop=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh stop
@abelardojarab
abelardojarab / tmux_local_install.sh
Last active October 23, 2019 21:28 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.8
@abelardojarab
abelardojarab / ZVJS SQLITE to ELK
Created January 14, 2020 21:15
This python script extract data from SQLite DB and pass it to into Elasticsearch. ZVJS DB is available on : https://morph.io/Pytlicek/SK_Prison_and_Court_Guard and it is part od OpenData project to scraping data from Goverment sites.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sqlite3
import json
import unicodedata
from elasticsearch import Elasticsearch
conn = sqlite3.connect('SK_Prison_and_Court_Guard.sqlite')
conn.row_factory = sqlite3.Row
#!/usr/bin/env python
#
# Copyright 2014-2015 Cameron Hart <cam@bitshifter.net.nz>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
@abelardojarab
abelardojarab / pixelbook-dev-setup.md
Created September 26, 2020 18:59 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@abelardojarab
abelardojarab / pixelbook-dev-setup.md
Created September 26, 2020 18:59 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@abelardojarab
abelardojarab / alternatives.sh
Created September 27, 2020 04:04 — forked from mpusz/alternatives.sh
Ubuntu scripts
#/bin/bash
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --remove-all clang
sudo update-alternatives --remove-all clang++
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7
@abelardojarab
abelardojarab / jupyter.service
Created October 22, 2020 03:58
systemd service for Jupyter notebook (pyenv + pipenv w/ CUDA libraries)
[Unit]
Description=Jupyter Notebook
After=network-online.target
[Service]
Type=simple
ExecStart=/home/ubuntu/.pyenv/shims/pipenv run jupyter notebook
Environment="LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64"
User=ubuntu
Group=ubuntu