Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| gsettings set org.cinnamon.desktop.privacy remember-recent-files false | |
| gsettings set org.cinnamon.theme name "Mint-Y-Dark" | |
| gsettings set org.cinnamon.desktop.interface gtk-theme "Mint-Y-Dark" | |
| gsettings set org.cinnamon.desktop.wm.preferences theme "Mint-Y-Dark" | |
| gsettings set org.cinnamon.desktop.interface cursor-blink false | |
| gsettings set org.gnome.system.proxy autoconfig-url "http://mediahint.com/default.pac" | |
| gsettings set org.gnome.system.proxy mode auto | |
| gsettings set org.cinnamon enabled-applets "['panel1:left:0:[email protected]:0', 'panel1:left:2:[email protected]:2', 'panel1:left:3:[email protected]:3', 'panel1:right:0:[email protected]:4', 'panel1:right:1:[email protected]:5', 'panel1:right:2:[email protected]:6', 'panel1:right:3:[email protected]:7', 'panel1:right:11:[email protected]:1', 'panel1:right:5:[email protected]:9', 'panel1:right:6:[email protected]:10', 'panel1:right:7:[email protected]:11', 'panel1:right:8:[email protected]:12', ' |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import string | |
| def succ(s): | |
| if not isinstance(s, (str, string)): | |
| raise TypeError("succ works only with strings") | |
| if not s: return |
| abandoned | |
| able | |
| absolute | |
| academic | |
| acceptable | |
| acclaimed | |
| accomplished | |
| accurate | |
| ace | |
| aching |
| aardvark | |
| aardwolf | |
| albatross | |
| alligator | |
| alpaca | |
| amphibian | |
| anaconda | |
| angelfish | |
| anglerfish | |
| ant |
| a = [1,2,3,4,5] | |
| # 2 new arrays | |
| left,right = a.each_slice( (a.size/2.0).round ).to_a | |
| # left == [1, 2, 3] | |
| # right == [4, 5] | |
| # make array 2-dimensional | |
| a.each_slice( (a.size/2.0).round ).to_a | |
| # a == [[1, 2, 3], [4, 5]] |
| # Just example about work with HTTP | |
| package Web; | |
| use strict; | |
| use IO::Socket::INET; | |
| use IO::Socket::SSL; | |
| use Carp qw(croak); | |
| use MIME::Base64 qw(encode_base64); |
| using ImageMagick; | |
| var image1Path = @"{-Project.Directory-}\ScreenStamps\1.bmp"; | |
| var image2Path = @"{-Project.Directory-}\ScreenStamps\2.bmp"; | |
| var diffImagePath = @"{-Project.Directory-}\imageDIFF.png"; | |
| using (ImageMagick.MagickImage image1 = new ImageMagick.MagickImage(image1Path)) | |
| using (ImageMagick.MagickImage image2 = new ImageMagick.MagickImage(image2Path)) | |
| { |
| using System; | |
| using System.ComponentModel; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Runtime.Serialization; | |
| /// <summary> | |
| /// Only for 32 bit processes. The methods of this static class can find the special symbol ThreadStack0, | |
| /// and follow pointer chains to return the end result in the specified type T. |