Skip to content

Instantly share code, notes, and snippets.

View softcup's full-sized avatar

softcup softcup

  • Taiwan
  • 01:43 (UTC +08:00)
View GitHub Profile
@jaceju
jaceju / xss_notes.md
Last active July 17, 2020 15:08
XSS 上課筆記

XSS 上課筆記

OWASP

  1. Injection
  2. Broken Authentication and Session Management
  3. XSS

Devcore

@m1
m1 / ferengi-apache.txt
Last active September 24, 2024 14:45
How to throttle the FCC to dial up modem speeds on your website using Apache.
# How to throttle the FCC to dial up modem speeds on your website using Apache.
# Ported from https://gist.github.com/kyledrake/e6046644115f185f7af0
## The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
##
## Current known FCC address ranges:
## https://news.ycombinator.com/item?id=7716915
##
## Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
@kyledrake
kyledrake / ferengi-plan.txt
Last active November 14, 2025 04:39
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@namuol
namuol / INSTALL.md
Last active December 11, 2024 12:21
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@maboa
maboa / Popcorn-jPlayer.htm
Last active December 16, 2015 03:39
Popcorn.js (IE8 version) with Popcorn jPlayer Player Plugin. Compatible with IE8+ and all other modern browsers. Estimated browser coverage 97% (April 12, 2013). Should also work in OGV only supporting Firefox 3.5. Similar coverage can be achieved with YouTube and Vimeo player.
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-ie8.min.js"></script>
<script src="http://popcornjs.org/code/dist/popcorn.plugins.min.js"></script>
<script src="https://raw.github.com/happyworm/popcorn-js/master/players/jplayer/popcorn.jplayer.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://jplayer.org/2.2.0/js/jquery.jplayer.min.js"></script>
<script>
anonymous
anonymous / random_inheritance.rb
Created March 30, 2013 23:32
#!/usr/bin/ruby
class Foo
def initialize
p "I'm foo"
end
end
class Bar
def initialize
@clonn
clonn / yeoman_grunt_bower.md
Last active December 15, 2015 00:49
usage for yoeman, grunt, bower

#Yoeman, bower, grunt.js cli tool usage

Installation, node.js and npm are required.

npm install -g yo grunt-cli bower

compass is a sass compoments of ruby, and you can install compass by rubygem

gem install compass
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@zachleat
zachleat / gist:2008932
Created March 9, 2012 21:56
Prevent zoom on focus
// * iOS zooms on form element focus. This script prevents that behavior.
// * <meta name="viewport" content="width=device-width,initial-scale=1">
// If you dynamically add a maximum-scale where no default exists,
// the value persists on the page even after removed from viewport.content.
// So if no maximum-scale is set, adds maximum-scale=10 on blur.
// If maximum-scale is set, reuses that original value.
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0">
// second maximum-scale declaration will take precedence.
// * Will respect original maximum-scale, if set.
// * Works with int or float scale values.
@jwage
jwage / SplClassLoader.php
Last active April 1, 2026 10:11
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,