Skip to content

Instantly share code, notes, and snippets.

@seanbuscay
seanbuscay / git_create_orphan.sh
Created June 27, 2013 15:26
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ccarouge
ccarouge / editfiles.py
Created October 27, 2019 23:15
Add line to a bunch of files and run the files
#!/usr/bin/env python
import pathlib
import subprocess
# Get the list of files we want to modify
p=pathlib.Path('mom6')
filelist=list(p.glob('**/sync_output_to_gdata.sh'))
# Loop on the files
for f in filelist:
@data-enhanced
data-enhanced / jupyter_default_browser.md
Last active June 28, 2024 16:37
Change default browser for Jupyter Notebooks in Mac OS X

Change the Default Browser for Jupyter Notebooks in OS X

Step 1. Create an editable config file for Jupyter notebooks.

To do this, open Terminal and type:

jupyter notebook --generate-config

This generates the file:

~/.jupyter/jupyter_notebook_config.py

@navidcy
navidcy / gist:cc1baced64d57b2ce7477eca71eeee2d
Created November 28, 2020 01:44
clear GeophysicalFlowsDocumentation previews folder
git clone https://github.com/FourierFlows/GeophysicalFlowsDocumentation.jl.git; cd GeophysicalFlowsDocumentation.jl; git checkout gh-pages; git rm -rf previews; git commit -m "delete previews"; git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}); git push --force origin gh-pages-new:gh-pages;