Skip to content

Instantly share code, notes, and snippets.

Daniel Toebe dtoebe

Block or report user

Report or block dtoebe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Termite on Debian 9
sudo apt-get install -y \
git \
g++ \
libgtk-3-dev \
gtk-doc-tools \
gnutls-bin \
valac \
intltool \
libtool \
libpcre2-dev \
@dtoebe
dtoebe / jupyter.service
Created Dec 28, 2019 — forked from whophil/jupyter.service
A systemd script for running a Jupyter notebook server.
View jupyter.service
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py
View Oh my zsh with autosuggestions & syntax-highlighting.md

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@dtoebe
dtoebe / multiple_ssh_setting.md
Created Nov 2, 2019 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@dtoebe
dtoebe / kaggle_download.py
Last active Aug 16, 2019 — forked from jayspeidell/kaggle_download.py
Sample script to download Kaggle files
View kaggle_download.py
# Info on how to get your api key (kaggle.json) here: https://github.com/Kaggle/kaggle-api#api-credentials
!pip install kaggle
api_token = {"username":"USERNAME","key":"API_KEY"}
import json
import zipfile
import os
with open('/content/.kaggle/kaggle.json', 'w') as file:
json.dump(api_token, file)
!chmod 600 /content/.kaggle/kaggle.json
!kaggle config path -p /content
@dtoebe
dtoebe / xclip
Created Mar 10, 2019 — forked from imiric/xclip
xclip for Cygwin/MSYS2
View xclip
#!/bin/bash
# This replicates xclip functionality used by pass in Cygwin/MSYS2
# Original author: https://tylor.io/2015/07/13/password-manager/
while [[ $# > 0 ]]
do
key="$1"
case $key in
-o|-out)
@dtoebe
dtoebe / .spacemacs
Created Jan 23, 2019
Spacemacs setup
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@dtoebe
dtoebe / init.vim
Last active Jan 11, 2019
Lean mean vim
View init.vim
set nu rnu
set hidden
set mouse=a
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
set hidden
set noswapfile
set nowrap
set noerrorbells
set novisualbell
set ruler
@dtoebe
dtoebe / init.toml
Created Dec 12, 2018
spacevim config
View init.toml
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]
View Error output
cargo build [16:54:54]
Compiling restapi v0.1.0 (file:restapi)
error[E0507]: cannot move out of captured variable in an `Fn` closure
--> src/main.rs:57:62
|
55 | let path = String::from("/path/to/data.json");
| ---- captured outer variable
56 | server::new(|| {
57 | App::with_state(AppState::new(AppState::collect_data(path).unwrap()))
| ^^^^ cannot move out of captured variable in an `Fn` closure
You can’t perform that action at this time.