recentpopularlog in
« earlier   later »
Random Renegade Bits > Solved: GIMP Script-Fu Console Image ID |
<code class="language-scheme">(script-fu-round-corners 1 (car (gimp-image-get-active-drawable 1)) 30 1 6 6 20 1 0)</code>
script-fu  gimp  scripting  imageprocessing  howto  solution 
may 2018
php - Removing X-Powered-By - Stack Overflow |

I think that is controlled by the expose_php setting in PHP.ini:
<code class="language-php">expose_php = off</code>

Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.

There is no direct security risk, but as David C notes, exposing an outdated (and possibly vulnerable) version of PHP may be an invitation for people to try and attack it.
php  webdevel  webmaster  security  configfile  configuration  solution  dammitbrain 
may 2018
Change Apache httpd "Server:" HTTP header - Unix & Linux Stack Exchange |
I simply changed the directives in security.conf and Apache started working as I wanted.
<code class="language-apache">
ServerTokens Prod
ServerSignature Off
webmaster  apache  httpd  config  configfile  security  configuration  solution  dammitbrain 
may 2018
numpy - Automatically import modules when entering the python or ipython interpreter - Stack Overflow |
Use the environment variable PYTHONSTARTUP. From the official documentation:
If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed in the same namespace where interactive commands are executed so that objects defined or imported in it can be used without qualification in the interactive session.

python  ipython  ptpython  startup  configfile  solution 
may 2018
python - Add another tuple to a tuple of tuples - Stack Overflow |
I thought that argument unpacking might work here, like 'a = (1,2,3)' and 'b = (0, *a)', but yeah, no it's called "argument" unpacking for a reason, and creating tuples isn't a function call. It might work with namedtuples though!

<code class="language-python"
# build another tuple-of-tuples out of another_choice,
# then concatenate:

final_choices = (another_choice,) + my_choices</code>
python  tuples  lists  concatenation  syntax  newbie  solution 
may 2018
extremeFE/bootstrap-checkbox: Three state checkbox for Bootstrap |
Interesting, but I don't think you can use the form inputs anymore, because they're replaced with divs. You would have to listen on the change events, and handle the remote updates there.

If they'd just hidden the original elements, it would've been fine.
webdesign  bootstrap  javascript  checkbox  tristate  maybesolution 
may 2018
Indeterminate Checkboxes | CSS-Tricks |
<code class="language-html"><!-- Inline click handler, just for demo -->
<input type="checkbox" id="cb1" onclick="ts(this)"></code>

<code class="language-javascript">
function ts(cb) {
if (cb.readOnly) cb.checked=cb.readOnly=false;
else if (!cb.checked) cb.readOnly=cb.indeterminate=true;
webdesign  webdeve  html  jquery  css  javascript  checkbox  tristate  tipsandtricks 
may 2018
Currency sign (typography) - Wikipedia |
It is represented in Unicode as U+00A4 ¤ CURRENCY SIGN (HTML &#164; · &curren; · Windows Alt+0164), \textcurrency in LaTeX.
typography  currency  symbols  unicode  solution 
may 2018
Transclusion - MediaWiki |
Sample: {{Special:Newpages/3}} gives 3 new pages.

URL parameters can be given like template parameters, e. g. {{Special:RecentChanges|namespace=10|limit=5}}.
mediawiki  templates  transclusion  wikitext  syntax  newbie  reference 
may 2018
PYTHON IndexError: tuple index out of range - Stack Overflow |
In my case, I had two format placeholders, but only one item in my parameter list to '.format()'; what I needed to do was make the "{0}" explicit, then it worked.
python  strings  formatstring  stringformatting  tuples  errormessage  solution 
may 2018
c# - Converting the date within the places.sqlite file in Firefox to a DateTime - Stack Overflow

Unix timestamps are measured in seconds. These values are larger by a factor of one million, i.e., they are using microseconds:

<code>> select datetime(1373306583389000 / 1000000, 'unixepoch');
2013-07-08 18:03:03</code>
mozilla  filrefox  places.sqlite  history  solution 
may 2018
Extension:PlaceNewSection - MediaWiki |
You need to add __ADDNEWSECTIONBELOW__ and __NEWSECTIONLINK__ to your article (if it's outside the "Talk" namespace) in order to get this working. But it works!

Other useful references:

* - (Make it possible to) always ignore NEWSECTIONLINK in mainspace at the English Wikipedia
mediawiki  editing  extension  movein  essential  fuckina  solution 
may 2018
Unlisted snippets (#13235) · Issues · / GitLab Community Edition · GitLab |
I would like to have snippets that are viewable by everyone, but not listed everywhere (IE you have to know the URL). Just like secret gists on GitHub Gist.
gitlab  featurerequest  snippets  watchthisspace 
may 2018
« earlier      later »
per page:    204080120160

Copy this bookmark:

to read