Skip to content

Instantly share code, notes, and snippets.

View ravenberg's full-sized avatar
✌️
Always eager

Lee Ravenberg ravenberg

✌️
Always eager
View GitHub Profile
@ravenberg
ravenberg / LoginFormAuthenticator.php
Created August 10, 2016 19:36
LoginFormAuthenticator
<?php
namespace AppBundle\Security;
use AppBundle\Form\LoginForm;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\RouterInterface;
public static void main(String[] args) {
JPanel newPanel = new JPanel();
}
var server = require('node-router').getServer();
server.get("/", function (request, response) {
response.simpleText(200, "Hello World!");
});
server.listen(8000, "localhost");
def greet(name):
print 'Hello', name
<?php
header('WWW-Authenticate: Basic realm="HN-Cloud"');
header('HTTP/1.0 401 Unauthorised');
def get_hash(name)
readsize = 64 * 1024
File.open(name, 'rb') do |f|
size = File.size?(name)
data = f.read(readsize)
f.seek(-readsize, IO::SEEK_END)
data += f.read(readsize)
return Digest::MD5.hexdigest(data)
end
end
http://api.jquery.com/submit/
/* Ugly fix to remove list float
-----------------------------------------------------------*/
@media screen and (max-width: 550px) {
.products .thumbnail-container {
margin-bottom: 0px !important;
}
.woocommerce ul.products li.product{
float: none !important;
}
}
@ravenberg
ravenberg / 0_reuse_code.js
Created November 26, 2015 08:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console