Skip to content

Instantly share code, notes, and snippets.

View franciskim's full-sized avatar
🎯
Focusing

Francis Kim franciskim

🎯
Focusing
View GitHub Profile
@leek
leek / _Magento1_DeleteTestData.md
Last active December 29, 2023 09:51
Magento 1 - Delete All Test Data

These set of scripts are for Magento 1. For Magento 2, see this Gist.

@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@bloudermilk
bloudermilk / README.md
Created March 23, 2012 19:07
Facebook Page Categories

All of the categories!

I wrote a really simple JavaScript script that uses jQuery to extract all the categories from Facebook's "Create a page" page.

Instructions

  1. Navigate to the Create a page page.
  2. jQuerify the page.
  3. Open up your JavaScript console of choice and run the following script:
@mystix
mystix / Observer.php
Last active July 6, 2021 05:23
Delete abandoned Magento shopping carts -- see http://www.magentocommerce.com/boards/viewthread/53981/P15/
<?php
/*
To make the cleaning expired carts automatic, override cleanExpiredQuotes with the following
version which will also take care of the old active carts: app/code/core/Mage/Sales/Model/Observer.php
*/
public function cleanExpiredQuotes($schedule)
{
// extending limit
@suprememoocow
suprememoocow / intercept.js
Created May 29, 2012 09:53
AJAX timing interceptor: this class intercepts all AJAX calls and records the time taken for the HTTP request to complete. These timings are posted back to the server in batches, if there are any to send, about every two seconds. Tested in Firefox, Chrome
(function(XHR) {
"use strict";
var stats = [];
var timeoutId = null;
var open = XHR.prototype.open;
var send = XHR.prototype.send;
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@ganglio
ganglio / fb.js
Created December 13, 2012 14:39
CasperJS: Facebook photos scraper
var casper = require('casper').create({
verbose : true,
logLevel : 'info'
});
var images = [];
var fs=require("fs")
/**
* Configuration here
*/
@mrluanma
mrluanma / user_agent_casper.js
Created December 14, 2012 17:16
How to set custom UserAgent in CasperJS.
var casper = require('casper').create({
verbose: true,
logLevel: "info",
pageSettings: {
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"
}
});
casper.start("https://httpbin.org/user-agent", function() {
this.test.assertTextExists(
@lukencode
lukencode / widget.js
Last active December 7, 2021 19:16
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');