- Setup
- Swapfile
- NGINX
- ElasticSearch
- RVM
- Rails
- Postgres
- Capistrano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# What is this? | |
# This script is for logseq webapp users that want to switch to the local version. | |
# It will download all images that are linked inside your graph and store them in the local "/assets/" folder. | |
# Remarks | |
# 1. Only supports Markdown files (for now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(http://fonts.googleapis.com/css?family=Handlee|Open+Sans&subset=latin); | |
body { | |
font-family: "Open Sans", Helvetica, arial, sans-serif; | |
font-size: 1em; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# project_name/spiders/foo_spider.py | |
from scrapy.contrib.spiders import CrawlSpider | |
class FooSpider(CrawlSpider): | |
post_process = dict( | |
klass = "Foo::Worker", | |
# queue = "default", | |
# retry = True, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Generating URL..." | |
FULL_PATH="/Users/tbenzige/Projects/aws" | |
#Count is kept based on a list.txt file | |
#list.txt is a plain text file meant to show relationships between URLs | |
#Instead of a running count, we just count the lines in list.txt | |
INITIAL=`echo -n $(cat $FULL_PATH/list.txt | wc -l)` | |
NUM="$INITIAL/4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, | |
<style type="text/css"> | |
#e { | |
position:absolute; | |
top:0; | |
right:0; | |
bottom:0; | |
left:0; | |
font-size:16px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
$ sudo chown -R `whoami` /usr/local/texlive | |
$ tlmgr update --self | |
$ tlmgr install ucs | |
$ tlmgr install etoolbox | |
# Install pandoc view homebrew |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note that the database is being used with login: root/password | |
# make necessary changes if you are using something else or simple remove that block | |
function newrails() { | |
app="$1"; ruby="${2:-1.9.3@rails}"; | |
if [ -n "${app}" ]; then | |
read -r -d '' gemfile <<-'EOF' | |
group :test, :development do | |
gem 'turn' | |
gem 'rspec-rails' | |
gem 'capybara' |
NewerOlder