Skip to content

Instantly share code, notes, and snippets.

View juriansluiman's full-sized avatar

Jurian Sluiman juriansluiman

View GitHub Profile
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@jm42
jm42 / 140.md
Last active December 24, 2019 14:54
140 bytes of PHP code

140 bytes

  • Framework

    • Twitto - A web framework in a tweet.
    • Kernel - A kernel in a tweet.
    • sized140 - Something like a framework in PHP with 6 components of 140 chars.
  • Router

  • mu - A tweet-sized PHP micro-router.
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
# coding=UTF-8
import nltk
from nltk.corpus import brown
# This is a fast and simple noun phrase extractor (based on NLTK)
# Feel free to use it, just keep a link back to this post
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/
# Create by Shlomi Babluki
# May, 2013
@Ocramius
Ocramius / SchemaValidityFunctionalTest.php
Created April 22, 2013 11:48
Functional test case for schema validation in Doctrine2 ORM
<?php
namespace Ocramius\CMS\ContentTest;
use Ocramius\CMS\ContentTest\Util\ServiceManagerFactory;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\ORM\Tools\SchemaValidator;
use PHPUnit_Framework_TestCase;
/**
@bretwalker
bretwalker / ssl_validator.py
Last active January 28, 2024 12:02
A Python script that uses M2Crypto to check the validity of an SSL certificate.
from M2Crypto import SSL
from M2Crypto.SSL.Checker import SSLVerificationError, NoCertificate, WrongCertificate, WrongHost
import socket, re
from datetime import datetime
import pytz
class ValidationResults:
def __init__(self):
self.connection_error = False
@Hounddog
Hounddog / CopyPropertyTask.php
Created September 27, 2012 09:16
Phing Task to copy files if the properties change
<?php
/**
* V5
* LICENSE
*
* Insert License here
*
* @category Phing
* @package CopyPropertyTask
* @copyright Copyright (c) 2012 Doyousoft
/**
* Handles errors during dispatch
*
* @param \Zend\Mvc\MvcEvent $e
*/
public function onDispatchError(MvcEvent $e)
{
$exception = $e->getParam('exception');
// Not an exception causing this.
@Ocramius
Ocramius / bootstrap.php
Created June 3, 2012 13:33
Setting up Doctrine DBAL to use UTF-8 in MySQL connections
<?php
use Doctrine\DBAL\Event\Listeners\MysqlSessionInit;
/* ... */
if(
isset($options['encoding'])
&& $this->_em->getConnection()->getDriver() instanceof MysqlDriver
) {
$this