Skip to content

Instantly share code, notes, and snippets.

@greister
greister / pandas_newline_strip.txt
Created Oct 14, 2019 — forked from smram/pandas_newline_strip.txt
[pandas] replace newlines,tabs,carriage returns in fields
View pandas_newline_strip.txt
# got to handle both escaped and literal
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>)
@greister
greister / weechat relay
Created Feb 27, 2018 — forked from meskarune/weechat relay
weechat relay with ssl
View weechat relay
mkdir ~/.weechat/ssl-cert
cd ~/.weechat/ssl-cert
openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -out relay.pem
In weechat:
/set relay.network.ssl_cert_key "/home/username/.weechat/ssl-cert/relay.pem"
/relay add ssl.weechat 9001
@greister
greister / install-swift-ubuntu.md
Created Feb 6, 2018 — forked from Azoy/install-swift-ubuntu.md
Guide on how to install Swift on Ubuntu
View install-swift-ubuntu.md

Install Swift on Ubuntu

Requirements

  1. Ubuntu 14.04, 16.04, or 16.10

Step 1 - Dependencies

  1. Open up terminal
  2. Install core deps: sudo apt-get install clang libicu-dev git

Step 1.1 - Ubuntu 14.04 Clang

View Vagrant debug log
vagrant : INFO global: Vagrant version: 2.0.1
+ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log"
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.0.1:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
INFO global: Ruby version: 2.4.2
INFO global: RubyGems version: 2.6.13
@greister
greister / Vagrantfile
Created Jan 31, 2018 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
View Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@greister
greister / download_vagrant_box.sh
Created Jan 26, 2018 — forked from firmanelhakim/download_vagrant_box.sh
How to Download Vagrant Box Manually
View download_vagrant_box.sh
/* this is the box (and the version) that we want to download from: https://app.vagrantup.com/debian/boxes/jessie64 */
wget https://app.vagrantup.com/debian/boxes/jessie64/versions/8.9.0/providers/virtualbox.box -O debian-jessie64-8.9.0.box
/* add the box to vagrant */
vagrant box add debian/jessie64 debian-jessie64-8.9.0.box
/* update box version */
cd ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64/
mv 0 8.9.0
@greister
greister / init.vim
Created Dec 16, 2017 — forked from synasius/init.vim
neovim configuration
View init.vim
" vim:foldmethod=marker:foldlevel=0
" vim-plug {{{
call plug#begin()
" color scheme
Plug 'chriskempson/base16-vim'
" syntax highlighting
Plug 'peterhoeg/vim-qml'
View gist:95e5c1da35fa884a0fa0de971b0747e7
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 2.0.1
INFO global: Ruby version: 2.4.2
INFO global: RubyGems version: 2.6.13
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\gems\\vagrant-2.0.1\\bin\\vagrant"
INFO global: VAGRANT_HOME="D:\\vagrant.d"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
@greister
greister / arch-vagrant-base-box-preparation.md
Created Nov 20, 2017
Notes on preparation minimal Vagrant base box for Arch / Manjaro Linux.
View arch-vagrant-base-box-preparation.md
@greister
greister / Export-ExcelCSV.ps1
Created Jun 26, 2017 — forked from majkinetor/Export-ExcelCSV.ps1
Export-ExcelCSV.ps1 #powershell #excel
View Export-ExcelCSV.ps1
# Author: Miodrag Milic <miodrag.milic@gmail.com>
# Last Change: 12-Feb-2016.
param(
# Path to Excel file
[string] $Path
)
if (!(Test-Path $Path)) { throw Path not found: $Path }
ps excel -ea 0| kill