A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
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
#!/usr/env python | |
############################################################################################################### | |
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script | |
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift | |
##------------------------------------------------------------------------------------------------------------- | |
## [Details]: | |
## This script is intended to be executed locally on a Linux box to enumerate basic system info and | |
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text | |
## passwords and applicable exploits. |
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
# coding=utf8 | |
# the above tag defines encoding for this document and is for Python 2.x compatibility | |
# See it in action https://regex101.com/r/ObowxD/5 | |
import re | |
regex = r""" | |
(?xm) | |
(?:\s|^) | |
([-+]*(?:\d+\.\d*|\.?\d+)(?:[eE][-+]?\d+)?) |
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
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Smac89 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
* associated documentation files (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, publish, distribute, | |
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
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
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const path = require('path'); | |
const PATHS = { | |
src: path.join(__dirname, 'src'), //absolute path to RepoDir/src | |
dist: path.join(__dirname, 'dist') //absolute path to RepoDir/dist | |
} | |
module.exports = { | |
entry: { | |
//Webpack will automatically resolve it to RepoDir/src/js/index.js (if file name is not specified) |
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
scala> val myRegex = """Foo=([0-9]+) Bar=([A-Z]+)""".r | |
myRegex: scala.util.matching.Regex = Foo=([0-9]+) Bar=([A-Z]+) | |
scala> "Foo=123 Bar=ABC" match { | |
| case myRegex(foo, bar) => | |
| println("foobar looks like %s-%s".format(foo,bar)) | |
| case _ => println("not a match") | |
| } | |
foobar looks like 123-ABC |
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
# Change YOUR_TOKEN to your prerender token | |
# Change http://example.com (at the end of the last RewriteRule) to your website url | |
<IfModule mod_headers.c> | |
RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
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 BaseHTTPServer import BaseHTTPRequestHandler | |
import urlparse, json | |
class GetHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
parsed_path = urlparse.urlparse(self.path) | |
message = '\n'.join([ | |
'CLIENT VALUES:', | |
'client_address=%s (%s)' % (self.client_address, |
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
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-5 g++-5 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
- Example: https://gist.github.com/atenni/5604522/raw/
- Works even when you change the filename.
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
OlderNewer