Skip to content

Instantly share code, notes, and snippets.

View snow's full-sized avatar

Snow Helsing snow

View GitHub Profile
@basti
basti / application.rb
Last active March 1, 2021 10:42 — forked from keighl/application.rb
Local Rails 4 assets precompilation using Capistrano 3 and rsync
# Speed things up by not loading Rails env
config.assets.initialize_on_precompile = false
@JakeWharton
JakeWharton / OkConnectionFactory.java
Created June 17, 2013 15:04
A connection factory for using OkHttp with Kevin Sawicki's HttpRequest library.
/**
* A {@link HttpRequest.ConnectionFactory connection factory} which uses OkHttp.
* <p/>
* Call {@link HttpRequest#setConnectionFactory(HttpRequest.ConnectionFactory)} with an instance of
* this class to enable.
*/
public class OkConnectionFactory implements HttpRequest.ConnectionFactory {
private final OkHttpClient client;
public OkConnectionFactory() {
@chuanxshi
chuanxshi / devise.zh-CN.yml
Created September 23, 2012 03:47
Simplified Chinese Translation for Devise 2.1
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
zh-CN:
errors:
messages:
expired: "您已过期,请重新申请"
not_found: "没有找到"
already_confirmed: "已经激活,请重新登录."
not_locked: "未锁定"
not_saved:
@snow
snow / gist:1396102
Created November 26, 2011 18:32
html5 file skeleton
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="zh_cn" />
<title></title>
<link rel="stylesheet" type="text/css" href="c/common.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="s/jquery.min.js"></script>
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Luigi Montanez's Ruby Feeds</title>
</head>
<body>
<outline title="ruby" text="ruby">
<outline text="Aaron Patterson" title="Aaron Patterson"
type="rss" xmlUrl="http://tenderlovemaking.com/feed/" htmlUrl="http://tenderlovemaking.com"/>
<outline text="Aaron Quint" title="Aaron Quint" type="rss"
@torsten
torsten / proxy.rb
Last active April 30, 2024 17:53
A quick HTTP proxy server in Ruby.
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,