Skip to content

Instantly share code, notes, and snippets.

Ido Kanner ik5

  • :::1
Block or report user

Report or block ik5

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
@rylev
rylev / rust-in-large-organizations-notes.md
Last active Nov 11, 2019
Rust in Large Organizations Notes
View rust-in-large-organizations-notes.md

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support
@ZAYDEK
ZAYDEK / howto
Last active Jul 21, 2019
Proof-of-concept for SQL-driven logging. You can like this tweet for updates: https://twitter.com/username_ZAYDEK/status/1114827120524419073
View howto
bash$ pg_ctl -D /usr/local/var/postgres start ## init postgres
bash$ psql -d postgres ## connect to postgres
psql# create database logger; -- create a database named "logger"
psql# begin; -- start a transaction
psql# \i log.sql -- load database
psql# commit; -- commit the transaction
bash$ go run log.go ## run driver program
@lizthegrey
lizthegrey / attributes.rb
Last active Nov 4, 2019
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@bgadrian
bgadrian / GolangCPUProfiles.sh
Last active Jul 27, 2019
Golang Flame graph profiles
View GolangCPUProfiles.sh
#install FlameGraph library
cd /opt/
sudo git clone https://github.com/brendangregg/FlameGraph.git
#make it accesible from any folder
vim ~/.bashrc
##add these lines anywhere and exit vim (if you can)
export FLAMEPATH=/opt/FlameGraph
PATH=$PATH:$FLAMEPATH
@johnpmitsch
johnpmitsch / react.md
Last active Jul 10, 2018
React/Redux Katello walkthrough resources
View react.md
@sharvit
sharvit / BreadcrumbBar.md
Last active Apr 26, 2018
BreadcrumbBar toturial
View BreadcrumbBar.md

BreadcrumbBar

breadcrumb-bar-2

Breadcrumbs display a users location within an application hierarchy. They act as a resource to help users navigate more efficiently and provide additional context.

The Breadcrumb Switcher provides a shortcut for users to quickly navigate to parallel pages, rather than navigating back to the previous page and making a new selection.

@zecar
zecar / Javascript Array betterFilter.md
Last active Apr 20, 2017
javascript array.filter faster alternative
View Javascript Array betterFilter.md
Array.prototype.betterFilter = function(expression) {
	var res = [];
	for(var idx=0; idx<this.length; idx++){
		var currentItem = this[idx];
		if(expression(currentItem)){
			res.push(currentItem);
		}
	}
	return res;
@dlants
dlants / denite.md
Last active Sep 16, 2019
denite setup with interactive ag pattern-search of project contents
View denite.md

Files

First things first, I want to use ag to search through my project files. Coming from fzf, I like to have two bindings for this -- one that respects my projects .gitignore and one that does not. The latter is helpful if I want to examine a built file or look at a node_module dependency while working on my js project.

I use an alias for file_rec source to toggle the -u flag on ag. Now, <C-P> searches in my git files, and <C-O> searches everything.

" denite file search (c-p uses gitignore, c-o looks at everything)
map <C-P> :DeniteProjectDir -buffer-name=git -direction=top file_rec/git<CR>
map <C-O> :DeniteProjectDir -buffer-name=files -direction=top file_rec<CR>
@knadh
knadh / zsh-elapsed-time.md
Last active Aug 13, 2019
Elapsed and execution time for commands in ZSH
View zsh-elapsed-time.md

Elapsed and execution time display for commands in ZSH

Append this to your ~/.zshrc file.

function preexec() {
  timer=$(($(date +%s%0N)/1000000))
@ericbn
ericbn / .vimrc
Last active Sep 12, 2019
Vim Powerline-like status line without the need of any plugin
View .vimrc
" Statusline (requires Powerline font)
set statusline=
set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %)
set statusline+=%< " Truncate line here
set statusline+=%f\ " File path, as typed or relative to current directory
set statusline+=%{&modified?'+\ ':''}
set statusline+=%{&readonly?'\ ':''}
set statusline+=%= " Separation point between left and right aligned items
set statusline+=\ %{&filetype!=#''?&filetype:'none'}
set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'')
You can’t perform that action at this time.