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
<?php | |
return [ | |
'class' => 'yii\db\Connection', | |
'dsn' => 'sqlite:/mnt/c/Users/user/calendy.sqlite', | |
'username' => 'root', | |
'password' => '_******_****', | |
'charset' => 'utf8', |
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.so | |
xdebug.mode=debug | |
xdebug.log=/var/log/xdebug.log | |
xdebug.idekey=PHPSTORM #Settings > Languages & Frameworks > PHP > Servers > localhost > [X] use path mappings > project files fill absolute path on server | |
xdebug.client_host=host.docker.internal #cat /etc/resolv.conf for the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM) |
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
<%= form_tag 'topics/edit_all' do %> | |
<% @topics.each do |topic| %> | |
<%= fields_for "topics[]", topic do |f| %> | |
<%= f.check_box :enabled %> | |
<%= f.label topic["name"] %><br /> | |
<% end %> | |
<% end %> | |
<%= submit_tag %> | |
<% end %> |
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
.\ffmpeg.exe -i C:\Users\user\Downloads\20230212_105950.MOV -r 10 -f image2 output_%05d.jpg | |
.\ffmpeg.exe -i C:\Users\user\Downloads\20230212_105950.MOV -f image2 -vsync 0 output_%05d.png | |
# -skip_frame nokey |
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
// given input#search, .my-menu a, .my-menu .sub-menu .a | |
jQuery(function(){ | |
jQuery('#search').on('keyup',function(){ | |
if(typeof(search_sidebar_timer)!='undefined'){ | |
window.clearTimeout(search_sidebar_timer); | |
} | |
search_sidebar_timer = window.setTimeout(function(){ | |
jQuery(".my-menu a").hide(); | |
var txt_show_filter = jQuery('#search').val().toLowerCase().trim(); |
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
mysqldump -u USER -p --single-transaction --quick --lock-tables=false DATABASE | gzip > OUTPUT.gz | |
The mysqldump reference at dev.mysql.com even says... | |
To dump large tables, you should combine the --single-transaction option with --quick. |
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 |
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
# 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
docker cp ./.ssh/id_ed25519 container-name:/root/.ssh/id_rsa ; docker exec container-name bash -c "chmod 700 /root/.ssh/id_rsa" |
NewerOlder