Skip to content

Instantly share code, notes, and snippets.

View robokoder's full-sized avatar

Robo Koder robokoder

View GitHub Profile
@robokoder
robokoder / restAPI.markdown
Created November 22, 2016 06:35 — forked from iksose/restAPI.markdown
Creating a REST API using Node.js, Express, and MongoDB

###Creating a REST API using Node.js, Express, and MongoDB

####Installing Node.js

Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.

Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.

@robokoder
robokoder / bootstrap_index.html
Created January 21, 2017 02:38 — forked from mlconnor/bootstrap_index.html
Bootstrap 3 CDN Template
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 3 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
@robokoder
robokoder / boot4_template.html
Created February 3, 2017 10:24 — forked from planetoftheweb/boot4_template.html
Bootstrap 4 Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">
</head>
<body>
<?php
// sendy/includes/functions.php
${"GLOBALS"}["ndcpdwgqk"]="textToDelete";
${"GLOBALS"}["ickwblj"]="string";
${"GLOBALS"}["xvhyjog"]="endPos";
${"GLOBALS"}["vxtvexpxdsk"]="end";
${"GLOBALS"}["kwrbitnoko"]="beginningPos";
${"GLOBALS"}["eesqiwndnuyk"]="i";
${"GLOBALS"}["tbiuhlfbdi"]="minlength";
@robokoder
robokoder / upload.php
Created March 18, 2017 02:10 — forked from fowkswe/upload.php
Replacement for sendy's upload.php that sends files to S3 rather than the server.
<?php
//
// this replaces includes/create/upload.php - besure to save your old upload.php!
// you must put the S3.php file in includes/helpers/S3.php
// you can get it here:
// https://github.com/tpyo/amazon-s3-php-class
//
// This is an improvement on this gist:
// https://gist.github.com/Wysie/03934b6a79a715772abd
//
@robokoder
robokoder / caddy.sh
Created March 22, 2017 05:22 — forked from Jamesits/caddy.sh
Install Caddy Server on Ubuntu
apt install curl
curl https://getcaddy.com | bash -s cors,expires,filemanager,git,hugo,ipfilter,jsonp,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
mkdir /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy
chmod 0770 /etc/ssl/caddy
@robokoder
robokoder / decode-membermouse-source.php
Created March 22, 2017 23:28 — forked from jtsternberg/decode-membermouse-source.php
Decode the MemberMouse obfuscated source files. Decodes all the base64 files in the MM cache and stores in a destination of your choosing (defaults to uploads/membermouse-source)
<?php
class Decode_MemberMouse_Source {
public $destination = '';
public $cache_dir = '';
public function __construct( $destination = '' ) {
$this->destination = $destination && is_writeable( $destination ) ? $destination : WP_CONTENT_DIR . '/uploads/membermouse-source';
$this->cache_dir = WP_CONTENT_DIR . '/plugins/membermouse/com/membermouse/cache';
}
@robokoder
robokoder / Yeti.css
Created April 7, 2017 04:52 — forked from aanjulena/Yeti.css
Sweepstakes Layout: Bootstrap + Bootswatch "Yeti" Theme (just add the CSS & JS code to your offer dashboard under the Customize > CSS/JS page)
.embedded .form-group, .form-group {
padding: inherit;
width: inherit;
box-sizing: inherit;
position: inherit;
color: inherit;
background-color: inherit;
}
textarea, select, select option, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
background-color: #fff;
#
# E-mail address for mailer's administrator (please specify!)
#
postmaster admin@mydomain.com
domain-key my-domain,*,/etc/dkim.key
#
# Settings per source IP address (for incoming SMTP connections)
#
<source 127.0.0.1>
<script>
(function(){'use strict';function y(a,b){for(var c in a)if(A(a,c)&&!1===b.call(a,a[c],c,a))break}function Qa(a){function b(a,b,c){t(d,a,function(a,e,f){a=za(a,e,f);vb(d,a.methods,b,c,a.v);return d})}var c="Object"===a,d=Ra(a,!0);b("defineStatic",1);b("defineInstance",2);b("defineInstanceAndStatic",3);b("defineStaticWithArguments",1,!0);b("defineInstanceWithArguments",2,!0);t(d,"defineStaticPolyfill",function(b,c,k){b=za(b,c,k);na(Y[a],b.methods,!0,b.v);return d});t(d,"defineInstancePolyfill",function(b,c,k){b=
za(b,c,k);na(Y[a].prototype,b.methods,!0,b.v);y(b.methods,function(a,b){oa(d,b,a)});return d});t(d,"alias",function(a,b){var c=d,e="string"===typeof b?d[b]:b;c[a]=e;e.instance&&oa(c,a,e.instance,!0);return d});t(d,"extend",function(b){function e(a,c){var d=b[a];if(d)for(var e=0,f;f=d[e];e++)if(f===c)return!0;return!1}function k(a,c){return b[a]&&!e(a,c)}function l(a,c,d){if(!c[a]||!d)return!1;for(a=0;a<d.length;a++)if(!1===b[d[a]])return!0}var g=Y[a],p=g.prototype,v={},E={};b=b||{};var u=b.meth