Skip to content

Instantly share code, notes, and snippets.

View qzm's full-sized avatar
🚀
I may be slow to respond.

Aaron Qiu qzm

🚀
I may be slow to respond.
View GitHub Profile
/// object_pool.hpp
#include <functional>
#include <iostream>
#include <memory>
#include <stack>
#include <tuple>
// Base class for all poolable objects
class PoolableObject {
@erikbern
erikbern / install-tensorflow.sh
Last active June 26, 2023 00:40
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
(function(){
/**
 * 功能:图片惰性加载。在需要图片惰性加载的页面底部载入。再将图片加上class=“lazy”。并将图片的真实地址放置在图片的自定义属性dataimg中。
 * @author haunghm
 * @version 1.0.0
 * @dependencies jquery 或者 zepto
 */
var lazyLoad = {
 
init: function() {
@cobyism
cobyism / gh-pages-deploy.md
Last active October 29, 2024 07:35
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

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).