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
| class MyClippings extends Shortcode { | |
| public $name = "my-clippings"; | |
| static $clippings; | |
| static function load_clippings() { | |
| if( ! self::$clippings ) { | |
| self::$clippings = file_get_contents( "https://drive.google.com/uc?export=download&id=[SOME FILE ID FROM Gdrive]" ); | |
| } | |
| } | |
| function process( $filter ) { | |
| self::load_clippings(); |
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
| potato |
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 | |
| // Forked from @levelsio | |
| function generateBitstampSignature( $nonce ) { | |
| $message = $nonce . BITSTAMP_ID . BITSTAMP_KEY; | |
| return strtoupper( hash_hmac( 'sha256', $message, BITSTAMP_SECRET ) ); | |
| } |
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
| ============================ | |
| Script filter: | |
| var q = "{query}"; | |
| var values = Application('Evernote').findNotes("notebook:Snippets " + q); | |
| var ret = '<?xml version="1.0"?><items>'; | |
| for (var i=0; i<values.length; i++ ) { | |
| var title = values[i].title(); | |
| var val = values[i].htmlContent().replace(/<br\/>/g,'{enter}').replace(/<[^>]*?>/g,""); |
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 filendir = require('filendir'); | |
| function define(fileName, args, func) { | |
| var content = ''; | |
| if (typeof func === 'function') { | |
| content = "define('" + fileName + "', \n" + JSON.stringify(args).replace(/,/g, ",\n") + ", \n" + func.toString() + "\n);"; | |
| } else if (typeof args === 'function') { | |
| content = "define('" + fileName + "',\n" + args.toString() + "\n);"; | |
| } | |
| filendir.ws(fileName + ".js", content); | |
| } |
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 function curl($Url,$args = array()) { | |
| //Translate get params. | |
| if(count($args)>0) { | |
| $tab=array(); | |
| while (list($key, $value) = each($args)) { | |
| $tab[]=$key."=".$value; | |
| } | |
| $get="?".implode("&",$tab); | |
| } else { |
NewerOlder