Skip to content

Instantly share code, notes, and snippets.

View tbreuss's full-sized avatar
🚴‍♂️
Biking

tebe tbreuss

🚴‍♂️
Biking
View GitHub Profile
@zpcastaneda
zpcastaneda / mysql_schema_compare.sql
Created September 24, 2018 04:29
MySQL Schema Compare
SET @database_current = '<production>';
SET @database_dev = '<development>';
-- column and datatype comparison
SELECT a.TABLE_NAME, a.COLUMN_NAME, a.DATA_TYPE, a.CHARACTER_MAXIMUM_LENGTH,
b.COLUMN_NAME, b.DATA_TYPE, b.CHARACTER_MAXIMUM_LENGTH
FROM information_schema.COLUMNS a
LEFT JOIN information_schema.COLUMNS b ON b.COLUMN_NAME = a.COLUMN_NAME
AND b.TABLE_NAME = a.TABLE_NAME
AND b.TABLE_SCHEMA = @database_current
WHERE a.TABLE_SCHEMA = @database_dev
@mrmartineau
mrmartineau / stimulus.md
Last active April 9, 2025 15:37
Stimulus cheatsheet
@tabula-rasa
tabula-rasa / app.scss
Created February 24, 2018 20:04
Mithril JS toaster-like notifications with proper css fade-out/fade-in animation
.m-notifications {
position: fixed;
bottom: 20px;
right: 20px;
display: flex;
flex-direction: column;
align-items: flex-end;
z-index: 10;
.m-notification {
//https://stackoverflow.com/questions/1179672/how-to-avoid-installing-unlimited-strength-jce-policy-files-when-deploying-an
private static void removeCryptographyRestrictions() {
if (!isRestrictedCryptography()) {
return;
}
try {
/*
* Do the following, but with reflection to bypass access checks:
*
* JceSecurity.isRestricted = false; JceSecurity.defaultPolicy.perms.clear();
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 30, 2025 11:13
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Mikulas
Mikulas / Dockerfile
Last active March 11, 2022 12:34
Docker image PHP 7.1 alpine with extensions
FROM php:7.1-fpm-alpine
RUN apk add --update \
autoconf \
g++ \
libtool \
make \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install mysqli \
@oranja
oranja / qtcreator_autotests.md
Last active July 15, 2017 08:13
Run and monitor AutoTests in QtCreator (QTestLib)

The Qt framework offers Qt Test / QTestLib as a simple unit-testing framework for Qt-based projects. Perhaps too simple, as it comes with an annoying limitation that requires a separate executable for each test class, or creating a single test runner with a manually added call to each test suite. A quick search shows easy and helpful workarounds that offer to replace the manual work with a short #include and a macro. Then the test-runner remains untouched and finds all your test suites with these hints alone.

1]: http://qtcreator.blogspot.co.il/2009/10/running-multiple-unit-tests.html

2]: https://marcoarena.wordpress.com/2012/06/23/increase-your-qtest-productivity/

3]: https://github.com/e-j/qt-multiple-tests

In version 4.0 of QtCreator, the AutoTest plugin is made available to all, through the Community Edition of QtCreator. It offers a decent “Test Results” output pane that allows you to run and monitor th

@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active December 23, 2024 15:56 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@Petah
Petah / DbMigrate.php
Created July 4, 2016 07:56
Simple Migrate
<?php
namespace MyProject\Cli\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class DbMigrate extends \Symfony\Component\Console\Command\Command
{
@tbreuss
tbreuss / dnsbl.php
Last active October 30, 2024 12:26
IP Blacklist Check Script - This is a simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once.
<?php // Simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once. ?>
<html>
<head>
<title>DNSBL Lookup Tool - IP Blacklist Check Script</title>
</head>
<body>
<h2>IP Blacklist Check Script</h2>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="text" value="" name="ip"/>
<input type="submit" value="LOOKUP"/>