Skip to content

Instantly share code, notes, and snippets.

View snowsky's full-sized avatar
💭
I may be slow to respond.

Hao snowsky

💭
I may be slow to respond.
  • Canada
View GitHub Profile
@1Marc
1Marc / workshops-planning.md
Last active January 20, 2023 02:34
Workshop Planning

This gist is no longer in use.

@keo
keo / bootstrap.sh
Last active January 25, 2024 15:49
Setup encrypted partition for Docker containers
#!/bin/sh
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
CRYPTFS_ROOT=/cryptfs
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
@davidkelley
davidkelley / .script.app
Last active December 2, 2024 01:28
Configures Vagrant to run Docker & Fig
# Run Application specific setup tasks here!
#!/usr/bin/env bash
cd /vagrant
fig run web foreman run rake db:create
fig run web foreman run rake db:migrate
@fpfeng
fpfeng / v2ex_auto_login.py
Last active June 10, 2023 16:54
登录 V2EX 领取每日奖励
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
username = '' ###账号###
password = '' ###密码###
login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https###
index_url = 'http://v2ex.com' ###同上###
mission_url = 'http://www.v2ex.com/mission/daily' ###同上###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
@ody
ody / gist:5718115
Last active December 18, 2015 03:29
---
# Data needed for Class['openstack::compute']
# The IP and interface that external sources will use to communicate with the instance and hypervisors.
openstack::compute::public_interface: 'eth0'
openstack::compute::internal_address: "%{ipaddress_eth0}"
openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}"
# The interface that will handle instance to intance communication and instance outbound traffic.
openstack::compute::private_interface: 'eth1'
@hectorcorrea
hectorcorrea / webserver.js
Last active June 29, 2024 12:51
web server in node.js
// A very basic web server in node.js
// Stolen from: Node.js for Front-End Developers by Garann Means (p. 9-10)
var port = 8000;
var serverUrl = "127.0.0.1";
var http = require("http");
var path = require("path");
var fs = require("fs");
var checkMimeType = true;