Skip to content

Instantly share code, notes, and snippets.

View joram77's full-sized avatar

Joram Declerck joram77

View GitHub Profile
Jul 2021
Here the solution
{
"Name": "Random",
"CreationDate": "2021-7-21",
"Commands": [
{
"Command": "executeScript_Sandbox",
Well, I solved this problem by recording a Macro and then binding it with a keyboard shortcut:
Go to Edit | Macros | Start Macro Recording
Type '->'
Stop Macro Recording using the button in the lower right corner, then name it whatever you want.
Assign Shortcut to it:
Go to File | Settings | Keymap | Macros |
Right click and choose 'Add Keyboard Shortcut'
I chose Ctrl+. as the shortcut and now I am more than happy. :)
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => 'sqlite:/mnt/c/Users/user/calendy.sqlite',
'username' => 'root',
'password' => '_******_****',
'charset' => 'utf8',
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)
<%= 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 %>
@joram77
joram77 / ffmpeg-vid-to-jpeg.ps1
Last active October 22, 2023 09:14
ffmpeg convert video to images
.\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
// 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();
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.
@joram77
joram77 / jaccard_recommendation.rb
Created September 27, 2023 06:46 — forked from otobrglez/jaccard_recommendation.rb
Simple recommendation system written in Ruby based on Jaccard index.
# 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
SELECT FIELDS(ALL) FROM Account LIMIT 200