2017/04/30

Styilish for Twitter

this is a work in progress:

Firefox + Stylish addon

this code removes "Moments":

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("twitter.com") {
.moments
{ display:none !important }

}

2016/10/18

MongoDB 3.2 on Slackware 14.0

Slackbuilds already have premade packages for MongoDB but the problem is, sometimes they are outdated. Some people might not want to upgrade their Slackware installation, and since I'm in such situation, here is my recipe

  1. grab the aproppiate MongoDB from Slackbuilds to your version of Slackware. 
  2. install it as usual with upgradepkg --install-new, but dont start it now
  3. grab binaries from https://www.mongodb.com/download-center
  4. unpack them
  5. overwrite unpacked binaries in /usr/bin
  6. and now you can start the server and restart Apache if needed

2016/09/24

vmware tools kernel headers

command line to fix the issue with the kernel header path on slackware for vmware tools configurator:

ln -s /usr/src/linux-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-$(uname -r)/include/linux/version.h

2016/02/26

FB Clean Stylish

another post of the same thing: how to get rid of annoying suggestions and ads

get Firefox + Stylish

inside Stylish create the following style:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("facebook.com") {
.uiTextareaAutogrow, .inputtext { color: black ; background-color:white }
#u_jsonp_5_1p,
._5ciw, .rhcFooter,
#appsNav,
#pagesNav,
#interestsNav,
#developerNav,
#listsNav,

#pagelet_bookmark_nav,
#u_jsonp_2_29,
#nf_megaphone_school_add,

#stream_story_525363c9273e41d84248140,

.stream_story_525363c9273e41d84248140,

#pagelet_stream_pager,

#‎u_0_30‬,

#rightCol,

#pagelet_side_ads,

#pagelet_pymk_timeline,

#escapeHatchMinimal_4__g,

#rightColWrap,

‪#‎pagelet_pymk_timeline‬,

‪#‎pagelet_megaphone‬,

‪#‎findFriendsNav‬,

.UIStandardFrame_SidebarAds,

.MessagingNetegoSidebar,

‪#‎MessagingNetegoSidebar‬,

‪#‎pagelet_bookmark_nav‬,

‪#‎pagelet_relationships‬,

‪#‎profile‬-friends-footer,

.pagelet_stream_pager,

‪#‎pagelet_stream_pager‬,

.rightCol,

‪#‎rightCol‬,

.rightColumnWrapper,

‪#‎rightColumnWrapper‬,

‪#‎pagelet_right_sidebar‬,

.pagelet_right_sidebar,

.fbTimelineSideAds,

#rightCol ‪#‎pagelet_ego_pane‬ .ego_column:nth-child(1),

.fbPhotoSnowboxAds,

.fbPhotoSnowboxAdsSide,

.fbEmu.fbEmuBlock.fbEmuEgo[id*="-id_"],

a[href*="/campaign/111111"], /* REMOVED TEMPORARY */

.fbEmuMarketplace,

‪#‎egoRefreshAds‬,

‪#‎pagelet_ego_pane_m‬,

‪#‎pagelet_ego_pane_w‬,

/* OLD STYLES */

.profile_sidebar_ads, .sidebar_ads, .adcolumn_header, .admarket_ad,

.ad_story, .social_ad_advert, .ads_feedback, .next_ad_button, .more_ads

{background:none !important;display:none !important}

}

2015/08/13

Installing Win + Linux Slackware on a Mac Book Pro 5 with lilo

here's a list of the things I did to successfully install Windows Vista and Linux Slackware 14 on a MBP 5 (after a lot of tries).


1) booted up using Slack CD ROM, deleted the GPT using the zap command
2) then booted up using the Win CD and installed using some space of the hard disk. And then I made sure the computer would boot it.

3) then booted up under Linux, repartitioned using fdisk, created swap and root filesystem, but I left marked as bootable only the Linux partition

4) setup as normal
5) when asked by lilo, I choose Automatic setup and install into MBR

Apparently Mac doesn't need the GPT or it's rebuild automatically on reboots. But MBR needs only one partition active.

2015/03/12

MySQLDump

how to properly dump a complete catalog (this post is a work in progress)



    mysqldump --login-path=XX database_here --add-drop-database --add-drop-table --add-drop-trigger --add-locks --comments --disable-keys --dump-date --lock-all-tables --log-error=/tmp/mysqldump.log --routines >/data/$RUTA/$SQLLOG

saving SPs only:

    mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt database_here > outputfile.sql

    

2014/09/13

MySQL Multi configuration

Example configuration of a mysqld instance in Slackware 14

root@trax:/etc/rc.d# cat /etc/my.cnf
[client]port=3307
socket=/tmp/mysql.sock2

[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user       = mysql
password   = mysql

[mysqld2]
socket     = /tmp/mysql.sock2
port       = 3307
pid-file   = /usr/local/mysql/var2/hostname.pid2
datadir    = /usr/local/mysql/var2
language   = /usr/local/share/mysql/english
user       = mysql

mkdir /usr/local/mysql/var2
cd /usr/local/mysql/
chown mysql.mysql var2

cd /usr
mysql_install_db --user=mysql --datadir=local/mysql/var2 --basedir=/usr

if needed copy mysqld.server.multi to /etc/rc.d

/etc/rc.d/mysql_multi start N

mysqladmin -uroot password --socket=/tmp/mysql.sock --port=PORT

mysql -uroot -p --socket=/tmp/mysql.sock --port=PORT

and allow root access if needed