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
| 'use strict'; | |
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: '<json:awesome.jquery.json>', | |
| banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + | |
| '<%= grunt.template.today("yyyy-mm-dd") %>\n' + | |
| '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + |
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
| # | |
| # blob : Object from MongoDB | |
| # | |
| # blob.body: Buffer | |
| # blob.size: length of buffer, substitute for blob.body.length | |
| # blob.type: MIME (Eg. audio/x-wav) | |
| # | |
| # req : Object from http | |
| # res : Object from http | |
| # _ : Object from underscore |
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 tableToJson(table) { | |
| var data = []; | |
| // first row needs to be headers | |
| var headers = []; | |
| for (var i=0; i<table.rows[0].cells.length; i++) { | |
| headers[i] = table.rows[0].cells[i].innerHTML.toLowerCase().replace(/ /gi,''); | |
| } | |
| // go through cells |
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
| #!/usr/bin/env python3 | |
| # pylint: disable=invalid-name | |
| """mbox-extract-attachments3 - Extract attachments from mbox files. | |
| Good companion for Google Takeout https://takeout.google.com/settings/takeout | |
| Modified by http://github.com/kellerza from | |
| https://github.com/PabloCastellano/pablog-scripts/ | |
| - Python3 & linter errors | |
| - New Filenames |
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 | |
| /* Plugin Name: Damn Vulnerable WordPress Plugin | |
| * Description: Intentionally vulnerable plugin for plugin author education | |
| * Version: 0.1 | |
| * Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/ | |
| * Author: Jon Cave | |
| * Author URI: http://joncave.co.uk | |
| * License: GPLv2+ | |
| * | |
| * DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE |
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
| require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); }); |
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
| from dotenv import load_dotenv | |
| load_dotenv() | |
| from langchain import OpenAI | |
| from langchain.agents import initialize_agent, tool | |
| from langchain.chains import LLMMathChain | |
| llm = OpenAI() |
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
| # Assuming an Ubuntu Docker image | |
| $ docker run -it <image> /bin/bash |
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
| /* | |
| Replace "your_schema" with whatever schema is appropriate in your environment. | |
| It is possible to use "public"... but you shouldn't! | |
| */ | |
| /* | |
| Function to stamp a "modified" timestamp. Adjust the name to suit your environment, | |
| but that name is hard-coded so it is assumed that you only use _one_ such name. |
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
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |
OlderNewer