Skip to content

Instantly share code, notes, and snippets.

View temitope's full-sized avatar

Temitope temitope

View GitHub Profile
@temitope
temitope / script.js
Created February 11, 2019 23:52
WPJgGo
// For CitrusByte app
const control = [1, 2, 3];
const simple = [[2,3]];
const simpleMix = [1, [2,3]];
const compound = [[0,1], [2,3]];
const compoundMix = [[0,1], 0.5, [2,3]];
const compoundMix2 = [[-4, -3,-2], [-1,0,1], 0.5, [2,3,4,5], 6, 7 ,8 ,9];
function flattenArray(arr) {
if(!Array.isArray(arr) || !arr.length){
'use strict';
var util = require('util'),
winston = require('winston'),
logger = new winston.Logger(),
production = (process.env.NODE_ENV || '').toLowerCase() === 'production';
module.exports = {
middleware: function(req, res, next){
console.info(req.method, req.url, res.statusCode);
@temitope
temitope / gist:1d5b566adb9de4334325
Created June 7, 2014 19:42
test mysqli libraries
<?php
//grab the vars needed out of the form post body
//connect to mysql database (so we can run commands)
// Create connection
$con=mysqli_connect("127.0.0.1","root","","test");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
@temitope
temitope / gist:26e344dbaa348201e6f0
Created June 7, 2014 19:18
byte group todo index php
<!DOCTYPE html>
<html>
<head>
<title>Group Todo List</title>
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
</div><!-- /.container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Group Todo List</title>
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>