Skip to content

Instantly share code, notes, and snippets.

View lee-pai-long's full-sized avatar
💭
Work In Progress

Saïdina MOHAMED ALI lee-pai-long

💭
Work In Progress
  • Marseille (France)
View GitHub Profile

[SQLSERVER] Verify database integrity

Connect to SQLSERVER

> osql -S <SERVER>/<INSTANCE> -E

Check integrity

[LINUX] Delete all empty file in a tree

$ find </path/to/tree> -type f -size 0 -exec rm -f {} \;

An option -name can be use to specify only certain files.

[CHROMIUM] Troubleshooting error "Your profile could not be opened correctly"

If you have a Google account

Stop chromium, open a terminal and delete the user profile directory :

$ rm -rf ~/.config/chromium/Default

[LINUX] Find the graphic card model installed

Using lspci

$ lspci -v | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 640M LE] (rev a1) (prog-if 00 [VGA controller])

[LINUX] get stripped IP

Get only private IP address from an interface

$ ip a | grep <interface> | grep inet | cut -f1 -d/ | awk '{print $2}'

or if your locale is set to english

[CentOS] Install NTP client

Install package

$ [sudo] yum install ntp

Activate ntp service on start

[ZIMBRA] Auto provisioning

available with version 8.x+


Use Case

When using an external LDAP directory (example: Microsoft Active Directory) as the authoritative source for account provisioning, streamline the process of creating the mailbox account and populating GAL attributes.

[BASH] Add go(lang) completion

$ [sudo] wget \
> https://raw.github.com/kura/go-bash-completion/master/etc/bash_completion.d/go \
> -O /etc/bash_completion.d/go

[ZIMBRA 8.x] Improve spamassassin detection


$ zmlocalconfig -e antispam_enable_rule_updates=true
$ zmlocalconfig -e antispam_enable_restarts=true
$ zmlocalconfig -e antispam_enable_rule_compilation=true
$ zmamavisdctl restart && zmmtactl restart

[ZIMBRA] Modify SMTP Relay Host


$ [sudo] su -l zimbra -c \
> "zmprov ms `zmhostname` zimbraMtaRelayHost 'my-smtp-relay-name-or-ip:port'"

To checkout: