Skip to content

Instantly share code, notes, and snippets.

View sbalci's full-sized avatar
🔬
🔬👀📑🗃📊🏨🗄📇📖⚗📝🎶📈📉📃🖍🔬🔬🏋🏻‍♂🚴🏻‍♂🚙👨‍💻🤷‍♂📸📺🎛🔭🔬💊🔐🍫🌸

Serdar Balcı sbalci

🔬
🔬👀📑🗃📊🏨🗄📇📖⚗📝🎶📈📉📃🖍🔬🔬🏋🏻‍♂🚴🏻‍♂🚙👨‍💻🤷‍♂📸📺🎛🔭🔬💊🔐🍫🌸
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@kmilligan
kmilligan / gist:4657831
Created January 28, 2013 18:24
Getting contents from a subdirectory of repo A into a different subdirectory of repo B while maintaining history
First, make repoA contain only the files from the subdirectory you care about. To do this, we're going to first create a new working branch, and then use the filter-branch function of git.
cd ~/repoA
git branch -b informative_branch_name
git filter-branch --subdirectory-filter branch/you/want/with/trailing/slash/ -- --all
If you ls, you'll see that the repo contains only the files from the desired subdirectory. It would be a poor decision to push at this time.
Next, visit repoB, and add repoA as a remote. After that, check out the branch you just created (informative_branch_name)
@cboettig
cboettig / knitr_defaults.R
Last active November 30, 2022 09:16
My common knitr defaults
# My preferred defaults (may be changed in individual chunks)
opts_chunk$set(tidy=FALSE, warning=FALSE, message=FALSE, cache=TRUE,
comment=NA, verbose=TRUE, fig.width=6, fig.height=4)
# Name the cache path and fig.path based on filename...
opts_chunk$set(fig.path = paste("figure/",
gsub(".Rmd", "", knitr:::knit_concord$get('infile')),
"-", sep=""),
cache.path = paste(gsub(".Rmd", "", knitr:::knit_concord$get('infile') ),
"/", sep=""))
@SachaEpskamp
SachaEpskamp / global.R
Last active October 22, 2021 08:55
A general shiny app to import and export data to R. Note that this can be used as a starting point for any app that requires data to be loaded into Shiny.
library("shiny")
library("foreign")
@Menencia
Menencia / readme.md
Last active March 8, 2022 18:29
Script to update a git project

Update a git repo

With this script, you can easily update a git repo.

Install

curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/update.sh > update.sh
curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/version.sh > version.sh
@rxaviers
rxaviers / gist:7360908
Last active May 5, 2024 12:57
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@smithdanielle
smithdanielle / check.packages.r
Created April 1, 2014 13:23
Check if multiple R packages are installed. Install them if they are not,then load them into the R session.
# check.packages function: install and load multiple R packages.
# Check to see if packages are installed. Install them if they are not, then load them into the R session.
check.packages <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
# Usage example
@evansims
evansims / example.html
Last active February 5, 2024 16:52
Embedding or sharing a image or photo uploaded to Google Drive.
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a>