Skip to content

Instantly share code, notes, and snippets.

@adamthebig
adamthebig / show-hidden-files.sh
Created April 11, 2015 00:10
Show hidden files in OSX
defaults write com.apple.finder AppleShowAllFiles YES
@adamthebig
adamthebig / gist:0980ea8fe510f7a27e30
Created March 28, 2015 18:20
Remove all instances of .DS_Store from git repo
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@adamthebig
adamthebig / readme.md
Last active August 29, 2015 14:14 — forked from coolaj86/how-to-publish-to-npm.md
Publishing an NPM module

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser

@adamthebig
adamthebig / .bowerrc
Created January 26, 2015 17:34
Change the default "bower_components" install location (Add a .bowerrc file in the root)
{
"directory" : "public/assets/lib"
}
@adamthebig
adamthebig / npm-errors.sh
Last active August 29, 2015 14:14
A fix if you are having to run sudo npm and can't run npm without errors
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/joyent/node.git
@adamthebig
adamthebig / ee-copyright
Last active August 29, 2015 14:13
ExpressionEngine Copyright Footer
@adamthebig
adamthebig / gist:fdb4179e42e61354a71c
Last active August 29, 2015 14:13
.htaccess force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@adamthebig
adamthebig / .ee-bootstrap-pagination
Last active October 9, 2019 06:48
ExpressionEngine Pagination with Bootstrap 3
{paginate}
{pagination_links}
<ul class="pagination">
{first_page}
<li><a href="{pagination_url}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
{/first_page}
{page}
<li{if current_page} class="active"{/if}><a href="{pagination_url}">{pagination_page_number}</a></li>
{/page}
{last_page}
@adamthebig
adamthebig / using-git.md
Last active August 29, 2015 14:13 — forked from hofmannsven/README.md
Using Git