Skip to content

Instantly share code, notes, and snippets.

View robbenmu's full-sized avatar
🤒
Out sick

Mr.Q robbenmu

🤒
Out sick
View GitHub Profile
@leemars
leemars / product.md
Last active March 7, 2016 12:30
万熊家的后山洞 亲友团

最后更新时间: 2014.1.19 | 点击 这里 前往店铺

熊, 听说你创业出来开淘宝店了?

我是出来折腾创业了, 但不是开淘宝店啊... 淘宝店哪里有这么好开!! 根本养不活自己的好吗!!

  • 因为工作原因, 需要对淘宝卖家工具进行测试, 所以开了店铺
  • 因为开了店铺以后需要往店里填充点宝贝才能测试, 所以做了分销
  • 因为自己是个吃货, 所以挑了零食的分销, 给自己买点便宜零食吃
  • 既然可以给自己买, 不如搞个亲友团, 给大家提供点便宜零食也不错的感觉, 乐于助人嘛
@theangryangel
theangryangel / AuthController.js
Created February 28, 2013 21:54
sails (v0.8.82) + passport + passport-local Rough Example. For the love of all that is holy, don't use this in production.
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@ebrehault
ebrehault / gist:4954392
Created February 14, 2013 17:17
casper drag&drop not working with leaflet
//==============================================================================
// Casper generated Thu Feb 14 2013 18:15:16 GMT+0100 (CET)
//==============================================================================
var x = require('casper').selectXPath;
var casper = require('casper').create();
casper.options.viewportSize = {width: 1615, height: 964};
casper.start('http://leafletjs.com/');
casper.then(function() {
Function.prototype.notifier = (function () {"use strict";
// (C) WebReflection - Mit Style License
function create(callback) {
function notifier() {
var args = [].slice.call(arguments), output;
if (fire(notifier, "before", callback, this, args, null)) {
try {
output = callback.apply(this, args);
} catch(e) {
@WebReflection
WebReflection / type.js
Created January 17, 2013 05:42
All JSON compatible (and incompatible thanks to "function") types in a simple cross platform function
var type = function (isArray, type){
return function(object) {
type = typeof object;
return type === "object" ? (
object ? (
isArray(object) ? "array" : type
) : "null"
) : type;
};
}(Array.isArray || function(Array, toString, array){
@cowboy
cowboy / call-invo-cursion.js
Last active March 30, 2023 01:59
JavaScript: call invo-cursion?
// OOP
console.log( 'OHAI'.blink() );
// Call invocation
console.log( String.prototype.blink.call('OHAI') );
// $ always makes things look awesome.
var $ = Function.prototype.call;
// Very explicit call invocation
@koto
koto / xssdetect.js
Created December 1, 2012 22:05
reflected xss detection using xssauditor on phantomjs
var page = require('webpage').create(),
system = require('system'),
address;
page.onInitialized = function () {
page.evaluate(function () {
// additional detection code here perhaps
// f.e. detecting STORED/DOM XSS
});
@jdarling
jdarling / Object.observe.poly.js
Created November 30, 2012 02:00
Initial Object.observe polyfill/shim trying to be compliant
/*
Migrated to: https://github.com/jdarling/Object.observe
Tested against Chromium build with Object.observe and acts EXACTLY the same,
though Chromium build is MUCH faster
Trying to stay as close to the spec as possible,
this is a work in progress, feel free to comment/update
http://wiki.ecmascript.org/doku.php?id=harmony:observe
@jackreichert
jackreichert / document.xml
Last active May 25, 2022 15:18
Convert Docx XML to HTML
<?xml version="1.0" encoding="UTF-8"?>
<w:document xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"
@davisford
davisford / script-log.js
Created September 30, 2012 22:35
phantom cookies puzzle
var page = require('webpage').create(),
fs = require('fs'),
requests = [], responses = [];
phantom.cookiesEnabled = true;
console.log('\n\n cookies we know about before page.open => \n\n' + JSON.stringify(phantom.cookies, null, 2));
// clear log from last time
if (fs.exists('requests.log')) {
fs.remove('requests.log');
}