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
const index = require('../index'); | |
const YAML = require('yaml'); | |
const fs = require('fs'); | |
const express = require('express'); | |
const router = express.Router(); | |
router.use(function timeLog (req,res,next) { | |
console.log('Time: ',Date.now()) | |
res.header('Access-Control-Allow-Origin', '*'); | |
next(); |
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
const express = require('express'); | |
const app = express(); | |
var index = require('./routes/index'); | |
app.use(express.json()); | |
app.use(express.urlencoded({ extended: true })); | |
app.use('/', index); | |
// start the server |
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 | |
namespace Cloudinary { | |
class Cli | |
{ | |
protected $plugin; | |
public function __construct($plugin) | |
{ | |
$this->plugin = $plugin; | |
} | |
public function __invoke() |
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 xmlreader { | |
var $filename; | |
var $dataset; | |
public function __construct($filename) { | |
$this->filename = $filename; | |
$this->load($this->filename); | |
} | |
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
#/bin/sh | |
du -k --max-depth=1 | sort -nr | awk ' | |
BEGIN { | |
split("KB,MB,GB,TB", Units, ","); | |
} | |
{ | |
u = 1; | |
while ($1 >= 1024) { | |
$1 = $1 / 1024; | |
u += 1 |
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
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: 'Your_APP_ID', | |
status: true, | |
cookie: true, | |
xfbml: true, | |
oauth: true | |
}); | |
showLoader(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
<?php | |
function inverse($num,$max) { | |
for ($i=0;$i<=$max;$i++) { | |
if ($num == ($max-$i)) return $i; | |
} | |
} | |
?> |
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 xmlDoc = CreateObject("Msxml2.DOMDocument") | |
xmlDoc.async = false | |
xmlDoc.load("filename.xml") | |
' See if given id exists | |
Dim idExists, currParentNode | |
idExists = false | |
Set objNodeList = xmlDoc.selectNodes("/events/event/id") | |
For each x in objNodeList |
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 curPageURL() | |
dim s, protocol, port | |
if Request.ServerVariables("HTTPS") = "on" then | |
s = "s" | |
else | |
s = "" | |
end if | |
protocol = strleft(LCase(Request.ServerVariables("SERVER_PROTOCOL")), "/") & s |
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
document.getElementById( 'signup' ).addEventListener( 'click', function( event ) { | |
event.preventDefault(); | |
document.getElementById( 'side-2' ).className = 'flip flip-side-1'; | |
document.getElementById( 'side-1' ).className = 'flip flip-side-2'; | |
}, false ); | |
document.getElementById( 'create' ).addEventListener( 'click', function( event ) { | |
NewerOlder