This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkExists (filepath) | |
| dim fs, result | |
| set fs = createObject("Scripting.FileSystemObject") | |
| result = fs.fileExists(filepath) | |
| set fs=nothing | |
| checkExists = result | |
| end function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function includeFile (fSpec) | |
| On Error Resume Next | |
| dim fileSys, file, fileData | |
| set fileSys = createObject ("Scripting.FileSystemObject") | |
| set file = fileSys.openTextFile (fSpec,ForReading) | |
| fileData = file.readAll () | |
| file.close | |
| set file = nothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(window).scroll(function(){ | |
| var $window = $(this); | |
| if($window.scrollTop() == $(document).height() - $window.height()) $('#more').click() | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.closest_descendent = function(filter) { | |
| var $found = $(), | |
| $currentSet = this; // Current place | |
| while ($currentSet.length) { | |
| $found = $currentSet.filter(filter); | |
| if ($found.length) break; // At least one match: break loop | |
| // Get all children of the current set | |
| $currentSet = $currentSet.children(); | |
| } | |
| return $found.first(); // Return first match of the collection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Public Function GetXmlData(url As String) As Object | |
| 'http://msdn.microsoft.com/ja-jp/library/aa468547.aspx | |
| Dim dom As Object | |
| Set dom = CreateObject("MSXML2.DOMDocument") | |
| dom.async = False | |
| 'http://support.microsoft.com/kb/281142/ja |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $_PUT = array(); | |
| parse_str(file_get_contents('php://input'), $_PUT); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'http_request_args', 'my_plugin_prevent_update_check', 10, 2 ); | |
| function my_plugin_prevent_update_check( $r, $url ) { | |
| if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) { | |
| $my_plugin = plugin_basename( __FILE__ ); | |
| $plugins = unserialize( $r['body']['plugins'] ); | |
| unset( $plugins->plugins[$my_plugin] ); | |
| unset( $plugins->active[array_search( $my_plugin, $plugins->active )] ); | |
| $r['body']['plugins'] = serialize( $plugins ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var FB = require('fb'); | |
| FB.api('oauth/access_token', { | |
| client_id: process.env.FACEBOOK_APP_ID, | |
| client_secret: process.env.FACEBOOK_SECRET, | |
| grant_type: 'client_credentials' | |
| }, function(res) { | |
| if (!res || res.error) { | |
| console.log('error occurred when getting access token:', res && res.error); | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require("http"), | |
| url = require("url"), | |
| fs = require("fs"), | |
| async = require("async"), | |
| Instagram = require('instagram-node-lib'); | |
| Instagram.set('client_id', /* client key */); | |
| Instagram.set('client_secret', /* client secret */); | |
| fetchTag('cat', 400); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| RewriteRule ^js - [L,NC] | |
| RewriteRule ^img - [L,NC] | |
| RewriteRule ^css - [L,NC] | |
| RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2&id=$3&format=$4 [QSA,L] | |
| RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2&id=$3 [QSA,L] | |
| RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2 [QSA,L] | |
| RewriteRule ^(.*)$ index.php?module=$1 [QSA,L] |