Skip to content

Instantly share code, notes, and snippets.

@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"
}
# 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}
; 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
Last Updated for Quartus II 18.1.0
Megafunctions
Set Generate Netlist to CHECKED.
Disable Advanced Fitter
Assignments => Settings => Compiler Settings => Advanced Settings (Fitter)
Set "Advanced Physical Optimization" to OFF.
@tedz2usa
tedz2usa / Installing SML-NJ on Ubuntu 18.04
Last active April 8, 2024 13:37
Installing SML-NJ on Ubuntu 18.04
Installation Tips for SML/NJ on Ubuntu 18.04
Ted Zhu
First, follow the steps outlined in the SML/NJ installation instructions for Unix:
http://smlnj.org/install/
The final step,
$ config/install.sh