Skip to content

Instantly share code, notes, and snippets.

View foloinfo's full-sized avatar
🏖️
Happy coding

foloinfo foloinfo

🏖️
Happy coding
View GitHub Profile
@masaakif
masaakif / grep_menuitem.vim
Last active October 28, 2022 13:28 — forked from scrooloose/grep_menuitem.vim
nerdtree menu plugin to grep under selected directory. : Forked from http://gist.github.com/205807
"shove this in ~/.vim/nerdtree_plugin/grep_menuitem.vim
"
" Add 'g' menu items to grep under selected directory.
" 'g' : prompts the user to type search pattern under selected dir.
" use parent directory if file is selected.
" This uses ':grep'.
"
" For ripgrep user,
" NERDTreeRipGrepDirectory function is much, much faster.
" Requirements:
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@kevinSuttle
kevinSuttle / meta-tags.md
Last active July 3, 2024 14:23 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@dsparks
dsparks / cairographics.R
Created September 24, 2012 19:12
Using cairographics with ggsave()
# .png with Windows GDI versus .png with cairographics
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("ggplot2", "RColorBrewer", "Cairo")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Generate some data
nn <- 100
myData <- data.frame(X = rnorm(nn),
@amano41
amano41 / Rprofile.R
Last active October 5, 2018 06:51
.Rprofile
## CRAN ミラーを指定
options(repos=list(CRAN="https://cran.rstudio.com/"));
## 起動時にロードするパッケージを追加
local({
pkgs <- getOption("defaultPackages");
options(defaultPackages=c(pkgs, "lattice", "car"));
});
## 零和対比をデフォルトに設定
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@christophergandrud
christophergandrud / d3SimpleNetwork.R
Last active March 7, 2017 07:28
An R function for creating simple D3 javascript directed network graphs.
#' An R function for creating simple D3 javascript directed network graphs.
#'
#' d3SimpleNetwork creates simple D3 javascript network graphs.
#'
#' @param data a data frame object with three columns. The first two are the names of the linked units. The third records an edge value. (Currently the third column doesn't affect the graph.)
#' @param Source character string naming the network source variable in the data frame. If \code{Source = NULL} then the first column of the data frame is treated as the source.
#' @param Target character string naming the network target variable in the data frame. If \code{Target = NULL} then the second column of the data frame is treated as the target.
#' @param height numeric height for the network graph's frame area.
#' @param width numeric width for the network graph's frame area.
#' @param file a character string of the file name to save the resulting graph. If a file name is given a standalone webpage is created, i.e. with a header and footer. If \code{file = NULL} then