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| /* | |
| * sshpubkeys (C)2012 by Jan-Piet Mens | |
| */ | |
| #define FUSE_USE_VERSION 25 | |
| #include <fuse.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <errno.h> |
| $ FILE=/some/path/to/file.txt | |
| ################################### | |
| ### Remove matching suffix pattern | |
| ################################### | |
| $ echo ${FILE%.*} # remove ext | |
| /some/path/to/file | |
| $ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |
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| #The MIT License (MIT) | |
| # | |
| #Copyright (c) 2015 Andre Queiroz | |
| # | |
| #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: |
| #!/bin/bash | |
| # name of the ipset - v4 or v6 will be appended. | |
| IPSET_NAME=cloudflare- | |
| # argument: v4 or v6 (defaults to v4) | |
| cloudflare_ipset () | |
| { | |
| local ipv | |
| local inetv |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.
RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| .DS_Store |
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Is a useful one-liner which will give you the full directory name of the script no matter where it is being called from
These will work as long as the last component of the path used to find the script is not a symlink (directory links are OK). If you want to also resolve any links to the script itself, you need a multi-line solution:
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink