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
| Public Sub ChartAll() | |
| On Error GoTo Handler | |
| Worksheets.Add before:=Worksheets(1) | |
| Sheets(1).Name = "Summary" | |
| Sheets(1).Activate | |
| 'Application.ScreenUpdating = False | |
| ' Fix issue with invalid data type to MakeArray | |
| Dim strSheetName As String | |
| ' end fix | |
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 directoryToArray($directory, $recursive) { | |
| $array_items = array(); | |
| if ($handle = opendir($directory)) { | |
| while (false !== ($file = readdir($handle))) { | |
| if (($file != "." && $file != "..") && | |
| (is_dir($directory. "/" . $file)) && | |
| ($recursive)) $array_items = array_merge($array_items, | |
| directoryToArray($directory. "/" . $file, $recursive)); | |
| if (is_dir($directory. "/" . $file)) { | |
| $file = $directory . "/" . $file; |
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
| const KEY_QUERY_VALUE = &H0001 | |
| const KEY_SET_VALUE = &H0002 | |
| const KEY_CREATE_SUB_KEY = &H0004 | |
| const DELETE = &H00010000 | |
| const HKEY_CURRENT_USER = &H80000001 | |
| const HKEY_LOCAL_MACHINE = &H80000002 | |
| const REG_SZ = 1 | |
| const REG_EXPAND_SZ = 2 | |
| const REG_BINARY = 3 | |
| const REG_DWORD = 4 |
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 isAllowedOrigin($origin) { | |
| // your logic here | |
| //... | |
| return true; | |
| } | |
| if (($_SERVER["HTTP_ORIGIN"]=="http://www.yoursite.com.au") || (isAllowedOrigin($_SERVER["HTTP_ORIGIN"]))) { | |
| header("Access-Control-Allow-Origin: *"); | |
| } |
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] |
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
| 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
| <?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
| <?php | |
| $_PUT = array(); | |
| parse_str(file_get_contents('php://input'), $_PUT); | |
| ?> |