This file contains 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 | |
class Create_Country_Codes_Table { | |
/** | |
* Make changes to the database. | |
* | |
* @return void | |
*/ | |
public function up() |
This file contains 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
https://rpgreen.wordpress.com/2016/02/23/a-mapping-template-to-send-everything-to-your-backend-integration/ | |
location/cookie headers: | |
https://stackoverflow.com/questions/35595672/aws-api-gateway-use-302-redirect-and-set-cookie-header | |
https://blog.hiramsoftware.com/blog/day-one-aws-api-gateway/ |
This file contains 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
{ | |
"config": { | |
"platform": { | |
"php": "8.0.28", | |
"ext-mongodb": "1.9.0RC1" | |
} | |
}, | |
"require": { | |
"mongodb/mongodb": "^1.4", | |
}, |
This file contains 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 | |
function strip_markdown( $md = '', $options = [] ) { | |
// char to insert instead of stripped list leaders (default: '') | |
$options['listUnicodeChar'] = isset( $options['listUnicodeChar'] ) ? $options['listUnicodeChar'] : false; | |
// strip list leaders (default: true) | |
$options['stripListLeaders'] = isset( $options['stripListLeaders'] ) ? $options['stripListLeaders'] : true; | |
// support GitHub-Flavored Markdown (default: true) | |
$options['gfm'] = isset( $options['gfm'] ) ? $options['gfm'] : true; |
This file contains 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
url.query = function( url ) { | |
var parsed = this.parse( url, true, false ), | |
query = Object.keys( parsed.query ), | |
result = {}; | |
if( query.length > 0 ) { | |
query.forEach(function(key){ | |
if( key.match( /([^\[]+)\[([^\]]+)\]/g ) ) { | |
key.replace( /([^\[]+)\[([^\]]+)\]/g, function( $0, $1, $2 ) { | |
result[$1] = result[$1] || {}; | |
result[$1][$2] = parsed.query[key]; |
This file contains 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 | |
class pastebin { | |
private $folder = './pastebins'; | |
public $pastes = array(); | |
function __construct( $folder = false ) { | |
if( $folder ) { | |
$this->folder = $folder; | |
} | |
$this->folder = rtrim( $this->folder, '/' ); |
This file contains 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
set Cap to (do shell script "ioreg -w0 -l | grep ExternalChargeCapable") | |
tell Cap to set {wallPower} to {last word of paragraph 1} | |
set CurrentVolume to output volume of (get volume settings) | |
if wallPower = "Yes" then | |
return 0 | |
else | |
set Cap to (do shell script "ioreg -wO -l | grep Capacity") | |
tell Cap to set {Available, Max} to {last word of paragraph 2, last word of paragraph 1} | |
set Pct to round (100 * (Max / Available)) |
This file contains 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(j,q,u,e,r,y,R,o,x){try{o=jQuery;if(o&&(!R||(R&&o.fn.jquery==R))){x=true}}catch(er){}if(!x||(R&&o.fn.jquery!=R)){(q=j.createElement(q)).type='text/javascript';if(r){q.async=true}q.src='//ajax.googleapis.com/ajax/libs/jquery/'+(R||1)+'/jquery.min.js';u=j.getElementsByTagName(u)[0];q.onload=q.onreadystatechange=(function(){if(!e&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){e=true;x=jQuery;jQuery.noConflict(true)(function(){y(x)});q.onload=q.onreadystatechange=null;u.removeChild(q)}});u.appendChild(q)}else{y(o)}})(document,'script','head',false,false,(function($){$(function(){ | |
/* code goes here */ | |
console.log($.fn.jquery); | |
})})); | |
// readable: | |
(function (j, q, u, e, r, y, R, o, x ) { | |
// IE8 undefined crash fix | |
try { |
This file contains 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 poptin, poptin_position, jQ224, all_poptins, test, query_string = new Object, | |
env = "app", | |
api_link = "https://display.popt.in", | |
cdn_server = "https://cdn.popt.in", | |
poptin_il_url = "https://www.poptin.co.il/", | |
poptin_com_url = "https://www.poptin.com/", | |
html_poptin_x_button = '<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;cursor: pointer;background: 0 0;border: 0;float: right;padding:0pxfont-size: 20px;line-height: 0.5;color: #000;text-shadow: #fff 0px 0px 10px;filter: alpha(opacity=20);text-transform: none;overflow: visible;margin: 0;font-size:53px;line-height: 31px;z-index: 9999;position: relative;">×</button>', | |
html_poptin_skip_button = '<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;padding: 5px;cursor |
NewerOlder