Skip to content

Instantly share code, notes, and snippets.

View Mouad-BGD's full-sized avatar

Mouad BOUGDOUR Mouad-BGD

View GitHub Profile
@Mouad-BGD
Mouad-BGD / gist:8803009
Created February 4, 2014 12:48
Google suggestion url API
http://www.google.com/complete/search?output=toolbar&q=[word-here]
@Mouad-BGD
Mouad-BGD / RecordMyDesktop
Last active February 11, 2016 14:08
RecordMyDesktop for Fedora
yum install recordmydesktop gtk-recordmydesktop
@Mouad-BGD
Mouad-BGD / Agreggetion
Created November 5, 2012 19:45
Drupal Views
REMOVE SORT CRITERIA TO ENABLE AGGREGATION FEATHER
@Mouad-BGD
Mouad-BGD / add RTL css file
Created September 28, 2012 17:02
Omega theme
We had the same issue, we needed to have a specific css per language to fine tune the presentation. We also needed this css file to load last. We did as follows:
1. Under the subtheme folder we added a branding folder containg a folder for each language where we added each of the css files. ie. themes/subtheme/branding/ar/styles.css (for arabic), themes/subtheme/branding/zh/styles.css (for chinese), themes/subtheme/branding/en/styles.css (for english) ... etc.
2. Then we modified the template.php file adding the following lines at the end, right before the closing of php ( ?> ):
function subtheme_preprocess_page(&$variables) {
global $language;
entity_load('user') actually does load all site users as objects, in an array indexed by uid
The WRT54G2 does not support the "DHCP reservation" feature, that is, the router cannot assign a device the same IP address each time it connects, based on the device's MAC address. However, the WRT54G2 does support the use of devices on your network that have fixed LAN IP addresses.
Linksys has some very specific rules about assigning a device a fixed LAN IP address. You must follow these rules carefully:
With Linksys routers, a fixed (static) LAN IP addresses must be assigned in the device that is using the address. So you need to enter the fixed address in the computer or printer, not in the router.
When using a Linksys router, any fixed LAN IP address must be outside the DHCP server range (typically 192.168.1.100 thru 192.168.1.149), and it cannot end in 0, 1, or 255.
Therefore any fixed LAN IP address would normally need to be in the range of
192.168.1.2 thru 192.168.1.99 or
It shows what you can do to make a user use SFTP only and disallow SSH usage for that user. All you have to do is change the user's login shell to /usr/lib/openssh/sftp-server ,e.g.:
usermod -s /usr/lib/openssh/sftp-server username
/usr/lib/openssh/sftp-server must be listed in /etc/shells as a valid login shell, so if it isn't already listed, please add it to /etc/shells as follows:
echo '/usr/lib/openssh/sftp-server' >> /etc/shells
************************************************************************************************************************
or
@Mouad-BGD
Mouad-BGD / Ref
Created June 21, 2012 19:04
iptables rules
http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
https://help.ubuntu.com/community/IptablesHowTo
@Mouad-BGD
Mouad-BGD / samba
Created June 19, 2012 17:11
Linux
1- install samba
yum install
2- install the gui
yum install
3- create samba users and password
smbpasswd -a username
4- modify the /etc/samba/smb.config
workgroup
5- modify firwall and ICMP filters