Remove DEFINER clause from MySQL Dumps - Stack Overflow | https://stackoverflow.com/
Solution for error messages like
ERROR 1449 (HY000) at line 1434: The user specified as a definer ('superman'@'%') does not exist
I don't think there is a way to ignore adding DEFINERs to the dump. But there are ways to remove them after the dump file is created.

- Open the dump file in a text editor and replace all occurrences of DEFINER=root@localhost with an empty string ""

- Edit the dump (or pipe the output) using perl:
<code class="language-bash">perl -p -i.bak -e "s/DEFINER=\`\w.*\`@\`\d[0-3].*[0-3]\`//g" mydatabase.sql</code>

- Pipe the output through sed:
<code class="language-bash">mysqldump ... | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' > triggers_backup.sql</code>
mysql  sql  dba  annoyance  errormessage  solution 
5 days ago
How to set background color in Writer? [closed] - Ask LibreOffice | https://ask.libreoffice.org/
Styles and Formatting (F11) → Page Styles (4th icon from left)
Select "Default" → right click: "Modify..." or "New..."

Sample: New... → Page Style: Background

Page tab → Margins
Set all margins to zero

page tab

Background tab
Select the background color

Borders tab
Line arrangement: Set all four borders
Line → Color: (e.g.:) the same as the background color
Spacing to contents: (e.g.:) 20 mm
☑ Synchronize
libreoffice  formatting  solution 
6 days ago
image manipulation - Create drop shadow effects in Imagemagick - Stack Overflow
<code class="language-bash">convert input.jpeg -bordercolor white -border 13 \( +clone -background black -shadow 80x3+2+2 \) +swap -background white -layers merge +repage output.jpg

As a gist: https://gist.github.com/ernstki/742a2140047e74804572d7e3e95a80d4
imagemagick  dropshadow  imageprocessing  solution  commandline  scripting  fuckina 
11 days ago
Add Shadow and Border to Images with ImageMagick | bemoko's blog on mobile
<code class="language-bash">image-shadow () {
echo "Converted file : $out"
if [ ! -z $2 ] ; then
convert $in -frame $2 $out
convert $in \( +clone -background black -shadow 60x5+10+10 \) \
+swap -background white -layers merge +repage $out
magemagick  imageprocessing  dropshadow  imagemanipulation  scripting  solution  fuckina 
11 days ago
DropShadow App Made With Automator and ImageMagick - Podfeet Podcasts
This is probably easier than trying to do it with Script-Fu, which I gave up on after about two hours in the (Guile) tutorial.
imagemagick  imageprocessing  dropshadow  imagemanipulation  automator  mac  osx  commandline  solution 
11 days ago
python - parsing XML file gets UnicodeEncodeError (ElementTree) / ValueError (lxml) - Stack Overflow | https://stackoverflow.com/
You are using the decoded unicode value. Use r.raw raw response data instead:
<code class="language-python">r = requests.get(url, params=payload, stream=True)
r.raw.decode_content = True

which will read the data from the response directly; do note the stream=True option to .get().

Setting the r.raw.decode_content = True flag ensures that the raw socket will give you the decompressed content even if the response is gzip or deflate compressed.

You don't have to stream the response; for smaller XML documents it is fine to use the response.content attribute, which is the un-decoded response body:
<code class="language-python">r = requests.get(url, params=payload)
xml = etree.fromstring(r.content)</code>

XML parsers always expect bytes as input as the XML format itself dictates how the parser is to decode those bytes to Unicode text.
xml  requests  elementtree  lxml  python  webdevel  errormessage  solution 
13 days ago
How does plastic get in the ocean? 5 questions we need to answer to fix plastic pollution - Vox | https://www.vox.com/
In other words, making environmentalism a social norm is one of the best ways to get people to be more aware of their behavior. Using the plastic straw ban as an example, he explained, “if everybody else in the restaurant is using them, and the context condones their use (e.g. straws on tables or put into drinks when served), then this increases the likelihood that an individual will act in accordance.”
oceans  pollution  plastic  pacificgarbagepatch  recycling  society  change 
15 days ago
linux - How to install `build-essential` in `Cygwin`? - Stack Overflow | https://stackoverflow.com/
Build-essential is a collection of packages. So you'll have to select the packages manually, which I believe are the following:

- make
- automake
- gcc
- gcc-c++
windows  cygwin  devel  build  toolchain  gcc  cplusplus  maybesolution  likedebian 
23 days ago
Manual:Timezone - MediaWiki | https://www.mediawiki.org/
<code class="language-php">#Set Default Timezone
$wgLocaltimezone = "Asia/Jakarta";
date_default_timezone_set( $wgLocaltimezone );</code>
mediawiki  configsetting  dateandtime  localtime  timezone  solution 
25 days ago
MediaWiki FAQ - Meta | https://meta.wikimedia.org/
How do I purge cached pages?

1. You can use ?action=purge on individual pages to update their cache dates.
2. There is a global $wgCacheEpoch variable which can be set in LocalSettings.php to invalidate all prior cache entries (see DefaultSettings.php)
3. If you want to purge all pages in the parser cache, truncate objectcache table from the wiki database. You may use this command:

<code class="language-sql">TRUNCATE TABLE objectcache;</code>

Hint: If this fails, you might be using a prefix for your database tables!
mediawiki  configsetting  config  webmaster  sysadmin  reference 
25 days ago
Python import statement semantics - Stack Overflow
<code class="language-python">import lxml.html as LH
doc = LH.parse('http://somesite')
lxml.html is a module. When you import lxml, the html module is not imported into the lxml namespace. This is a developer's decision. Some packages automatically import some modules, some don't. In this case, you have to do it yourself with import lxml.html.

import lxml.html as LH imports the html module and binds it to the name LH in the current module's namespace. So you can access the parse function with LH.parse.

python  lxml  imports  syntax  annoyance  solution 
27 days ago
The War on Developer Productivity (And How I Intend to Win It) - derrickreimer.com
Chat is a greedy mode of communication.

* It doesn’t care if you are deep in flow.
* It begs you to incessantly clear its notification badges.
* It buries important conversations among idle chatter when you snooze it.
* It must be used with restraint or it becomes toxic.
workplace  productivity  chatapps  slack  distraction  chat  collaboration  communication 
27 days ago
Opinion | The Best Book for 2018 Is 25 Years Old - The New York Times
It has become fashionable for writers to talk about the transformative power of empathy in fiction. But that potential is realized only when empathy is deployed in conjunction with an understanding of power and how it functions.

Jess continually marks the ways oppressive systems are most damaging — the way they force those who are oppressed to hate themselves and identify with their oppressor. And to navigate them, you are often asked to kill off any feeling or natural part of yourself to survive.
opression  activism  gender  passing 
28 days ago
« earlier      
acf addon addressbook advice alternativeto america android animation annoyance apache api app apple applescript art article audio authentication automation backupandrecovery bash bestpractices bioinformatics blog browser bug by:20gnd c calendar centos chrome cli cloudstorage collaboration comic commandline configfile console cplusplus crossplatform cs css culture cycling dammitbrain database dba debian debugging design devel disasterrecovery documentation driver dropbox editor education email employment encryption errormessage essential extension eyecandy favorite filemanagement filesystem film firefox flask framework freeware from:twitter funny git github gmail gnome google graphics gui hacking hardware history hosting howto html html5 humor icons ide imageprocessing inspiration installation interesting ios iphone java javascript jquery keyboard language latex ldap learning library linux list lists mac markdown math matlab maybesolution mediawiki mobile movein mozilla music mysql mystuff needshelp networking newbie news nonfree opensource osx packagemanagement pdf perl photography php plugin politics printing privacy productivity programming projectstowatch python rails reference research ruby samplecode science scm script scripting searchandindex searchengine security service shell shellscripting socialmedia software solution ssh storage syntaxhighlighting sysadmin systemmonitoring terminal testing textprocessing thefuture theme thewaythingswere thunderbird tipsandtricks todo toolchain troubleshooting tutorial twitter ubuntu ui unix utility versioncontrol via:ifttt video vim visualization watchthisspace web webapp webapps webdesign webdevel webmaster wiki win7 windows wishlist wordpress work writing x11

Copy this bookmark: