Skip to content

Instantly share code, notes, and snippets.

# Cycle through tabs in the correct or intuitive order.
'body':
'ctrl-tab ^ctrl': 'unset!'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
# Inside httpd-vhost.conf
<VirtualHost *:80>
ServerName docserver.proj
DocumentRoot "C:\Users\....\projectfolder\site"
ErrorLog "C:\Users\....\projectfolder\logs\errors.log"
CustomLog "C:\Users\....\projectfolder\logs\access.log" common
#IfWinActive SOLIDWORKS
<+LButton::MButton
#IfWinActive SOLIDWORKS
<^LButton::MButton
http://stackoverflow.com/questions/1641182/how-can-i-catch-a-ctrl-c-event-c
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
void my_handler(int s){
printf("Caught signal %d\n",s);
exit(1);
http://stackoverflow.com/questions/1056411/how-to-pass-variable-number-of-arguments-to-printf-sprintf
void Error(const char* format, ...)
{
va_list argptr;
va_start(argptr, format);
vfprintf(stderr, format, argptr);
va_end(argptr);
}
If you want to manipulate the string before you display it and really do need it stored in a buffer first, please please please use vsnprintf instead of vsprintf. vsnprintf will prevent an accidental buffer overflow error.
#n::
Run, Notepad.exe
return
!Media_Prev::
Send !{F4}
return
!j::
Send {Left}
@tedz2usa
tedz2usa / Emacs Shortcut Notes
Last active April 26, 2019 15:54
Emacs Shortcut Notes
Move to beginning or end of line: [HOME] or [END]
Move by word: [ALT]+[F], [ALT]+[B]
Disable line wrapping: M-x toggle-truncate-lines
@tedz2usa
tedz2usa / My Sublime Text 3 Settings
Last active May 18, 2019 10:46
My Sublime Text 3 Settings
# Key Bindings – User
{
"keys" : ["f5"],
"command" : "refresh_folder_list"
}
; Win+N for new notepad window
; Win+S for new Sublime Text Window
#n::
Run, Notepad.exe
return
#s::
; The "hide" portion is to prevent a console window from opening when running
@tedz2usa
tedz2usa / Procedure for Resetting MySQL root password on Ubuntu 18.04 LTS.MD
Last active May 22, 2020 17:55
Procedure for Resetting MySQL root password on Ubuntu 18.04 LTS

Procedure for Resetting MySQL root password on Ubuntu 18.04 LTS

There is a way to start MySQL in a safe mode with the SUDO command, bypassing user authentication. When we start the MySQL Server in this mode, we can enter the mysql shell without a password, and have access privileges to all databases and tables. From there, we'll be able to reset the mysql root user password.


First, stop the existing MySQL Server: