This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM information_schema.tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zend_extension=xdebug | |
[xdebug] | |
xdebug.mode=debug # develop has impact on performance | |
xdebug.client_port = 9000 | |
xdebug.idekey=PHPSTORM | |
xdebug.client_host=host.docker.internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%div.button | |
= render layout: 'folder/link_layout', locals: {link: link} do | |
= button_contents_variable | |
#folder/_link_layout.html.haml contents: | |
%a{href: link} | |
= yield # contents of button_contents_variable will be nested in the %a tag | |
# inspired by https://stackoverflow.com/questions/35933558/unexpected-error-using-yield-in-haml-nesting | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOCKER_CP_XDEBUG_ON=docker cp docker/php-fpm/docker-php-ext-xdebug-on.ini php-fpm_1:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
DOCKER_CP_XDEBUG_OFF=docker cp docker/php-fpm/docker-php-ext-xdebug.ini php-fpm_1:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
.PHONY: about xdebug-on xdebug-off | |
about: | |
echo "Xdebug Makefile https://github.com/joram77 - Joram Declerck" | |
echo "- Install: copy contents to Makefile in your project" | |
echo "- Usage: make xdebug-on or make xdebug-off" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo badblocks -sv /dev/sda > bad-blocks-result | |
sudo fsck -t ext4 -l bad-blocks-result /dev/sda1 | |
---- | |
sudo add-apt-repository universe | |
sudo apt-get install hfsprogs hfsplus | |
sudo fsck.hfsplus /dev/sda2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# B from C fromdomain D frompath E statuscode F to G rewriterule(formula below) | |
="if ($host = """&C8&""") { rewrite ^"®EXREPLACE(regexreplace(B8,"(.+)\?(.*)","$1"),"^(https://|http://)([^/]+)(.+)","$3")& "$ "& F8 &"? permanent; }" | |
# C fromdomain (formula below) | |
=index(split(B3,"/"),0,2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker cp ./.ssh/id_ed25519 container-name:/root/.ssh/id_rsa ; docker exec container-name bash -c "chmod 700 /root/.ssh/id_rsa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Powershell script to split large sql files to separate sql files per table - joram77 | |
$inputFile = "c:\users\money\dumps\db_slimmed.sql" | |
$fileInfo = New-Object System.IO.FileInfo($inputFile) | |
$newDir = $fileInfo.Directory.ToString() + '\' + $fileInfo.BaseName.ToString() | |
New-Item -ItemType Directory -Force -Path $newDir | |
$outputFile = "$newDir\db_slimmed_start.sql" | |
$reader = New-Object System.IO.StreamReader($inputFile) | |
$count = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT FIELDS(ALL) FROM Account LIMIT 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Recommendation Engine in Ruby | |
# Visit: http://otobrglez.opalab.com | |
# Author: Oto Brglez <[email protected]> | |
class Book < Struct.new(:title) | |
def words | |
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
end |