Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
#!/usr/bin/ruby | |
require 'digest/sha1' | |
require 'tempfile' | |
require 'fileutils' | |
URL = 'YOUR_URL' | |
SSH_HOST = 'YOUR_HOST' | |
SSH_HOST_DIR = "#{SSH_HOST}:PATH_ON_SERVER" |
out_to_x no | |
own_window no | |
out_to_console yes | |
background no | |
max_text_width 0 | |
# Update interval in seconds | |
update_interval 2.0 | |
# This is the number of times Conky will update before quitting. |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
#!/usr/bin/python2 | |
# setup: pip install requests beautifulsoup4 | |
from decimal import Decimal | |
import requests | |
from bs4 import BeautifulSoup | |
import sys | |
# Session setup |
#!/usr/bin/lua | |
-- Metrics web server (0.1) | |
-- Copyright (c) 2015 Kevin Lyda | |
-- Apache 2.0 License | |
socket = require("socket") | |
netsubstat = {"IcmpMsg", "Icmp", "IpExt", "Ip", "TcpExt", "Tcp", "UdpLite", "Udp"} | |
cpu_mode = {"user", "nice", "system", "idle", "iowait", "irq", | |
"softirq", "steal", "guest", "guest_nice"} | |
netdevsubstat = {"receive_bytes", "receive_packets", "receive_errs", |
# Typical setup to include TensorFlow. | |
import tensorflow as tf | |
# Make a queue of file names including all the JPEG images files in the relative | |
# image directory. | |
filename_queue = tf.train.string_input_producer( | |
tf.train.match_filenames_once("./images/*.jpg")) | |
# Read an entire image file which is required since they're JPEGs, if the images | |
# are too large they could be split in advance to smaller files or use the Fixed |
This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.
I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)
Add the following lines to your .vimrc/_vimrc:
#!/bin/bash | |
TMP=`mktemp` | |
trap ctrlC INT | |
removeTempFiles() { | |
rm -f $TMP | |
} | |
ctrlC() { |