This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* global.php file. | |
* Global shorthand functions for commonly used Yii methods. | |
* @author Christoffer Niska <christoffer.niska@gmail.com> | |
* @copyright Copyright © Christoffer Niska 2013- | |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License | |
*/ | |
defined('DS') or define('DS', DIRECTORY_SEPARATOR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace DirsApp | |
{ | |
class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
DirectoryInfo root = new DirectoryInfo("."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timestamp = datetime.utcnow() - timedelta(seconds=60) | |
expiration_time = timestamp.strftime('%a, %d %b %Y %H:%M:%S GMT') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import etree | |
from io import StringIO | |
html = """"Hello, world!"<span class="black"> | |
<div class="c1">division | |
<p>"Hello - this is me. | |
(c) passage in division" | |
<b>"bold in passage "</b> | |
</p> | |
My phone: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup, Comment | |
SKIP_TAGS = ['style', 'script', 'meta', 'code', 'pre'] | |
html = """ | |
"Hello, world!"<span class="black"> | |
<div class="c1">division | |
<p>"Hello - this is me. | |
(c) passage in division" | |
<b>"bold in passage "</b> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ctrl+Q | |
Ctrl-Alt-T | |
Ctrl+B | |
Ctrl+Alt+влево | |
Ctrl+J | |
Ctrl+F12 | |
Ctrl+G | |
Ctrl+D | |
Alt+Shift+C | |
Ctrl+Shift+A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load i18n %} | |
<div class="row"> | |
<div class="col-xs-12"> | |
<section class="paginator text-center"> | |
<nav> | |
<ul class="pagination"> | |
<li> | |
{% if page.has_previous %} | |
<a href="?page={{ page.previous_page_number }}" aria-label="Previous"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Link: http://www.reddit.com/r/PowerShell/comments/1khn9o/a_fun_script_for_friday_make_your_friends/ | |
# A fun script for Friday - make your friend's computer start talking to him/her (self.PowerShell) | |
# submitted 1 year ago * by Sinisterly | |
# A co-worker of mine stumbled upon this nifty blog article on how to make a text-to-speech call using PowerShell. | |
# The article gives two examples: | |
# - Call the SAPI.SPVoice COM object | |
# - Load the reference to System.Speech | |
# Where can this come in fun? Well, if you throw PSRemoting in, of course! In my testing, if you use the second method (or the pared down script below) you can make your victim's computer start talking to him or her. Here's how you do it: | |
# 1. Provide a distraction so that your victim leaves their computer unlocked, and make yourself administrator on their workstation (only needed if you aren't already an admin!) | |
# 2. Enable PSRemoting on their workstation. A method for doing this would be using PSExec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly | |
https://github.com/powerline/fonts | |
case $(uname -a) in | |
*Microsoft*) unsetopt BG_NICE ;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned | |
Update-Help |
OlderNewer