Skip to content

Instantly share code, notes, and snippets.

View image72's full-sized avatar

image72 image72

View GitHub Profile
@trey
trey / hubot-slack-heroku.md
Last active October 25, 2021 03:18
Steps to Install Hubot in Slack using Heroku
@demisx
demisx / angularjs-providers-explained.md
Last active December 26, 2024 05:39
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@massar
massar / server-git.conf
Created March 6, 2014 21:14
Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# [email protected] - http://jeroen.massar.ch
server {
listen 192.0.1.1:80;
listen [2001:db8::1]:80;
# Redirect all non-HTTPS traffic to the HTTPS variant
return 301 https://$host$request_uri;
}
@hwdsl2
hwdsl2 / .MOVED.md
Last active April 10, 2025 04:32
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
/**
* User Timing polyfill (http://www.w3.org/TR/user-timing/)
* @author RubaXa <[email protected]>
*/
(function (window){
var
startOffset = Date.now ? Date.now() : +(new Date)
, performance = window.performance || {}
, _entries = []
@ejdyksen
ejdyksen / patch-edid.md
Last active April 20, 2025 08:08
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@kennethlynne
kennethlynne / angular-mock-backend.js
Last active March 22, 2025 17:37
High fidelity prototyping using a mock back-end. Include angular-mocks in your script includes after angular. Demo: http://codepen.io/kennethlynne/pen/lJbce
'use strict';
angular.module('yourApp')
.constant('Config', {
viewDir: 'views/',
API: {
useMocks: true,
fakeDelay: 2000,
protocol: window.location.protocol.split(':')[0],
host: window.location.hostname,
@kasuganosora
kasuganosora / gist:7714921
Last active August 20, 2019 06:40
刚配置完IPSEC(strongSwan U5.1.1/K3.11.6) 用到的配置
#生成CA密钥
ipsec pki --gen --outform pem > caKey.pem
#生成CA证书
ipsec pki --self --in caKey.pem --dn "C=US, O=你的组织名字, CN=你的CA名字" --ca --outform pem > caCert.pem
#生成服务器密钥
ipsec pki --gen --outform pem > serverKey.pem
@sergejmueller
sergejmueller / mime.types
Created November 27, 2013 09:00
Nginx: Detecting WebP support with Header Vary Accept. Filename format: image.jpeg / image.webp
...
image/webp webp;
...