To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
| /** | |
| * Return a unique identifier with the given `len`. | |
| * | |
| * utils.uid(10); | |
| * // => "FDaS435D2z" | |
| * | |
| * @param {Number} len | |
| * @return {String} | |
| * @api private | |
| */ |
To keep the changes from the commit you want to undo
$ git reset --soft HEAD^
To destroy the changes from the commit you want to undo
$ git reset --hard HEAD^
You can also say
| def byteify(input): | |
| if isinstance(input, dict): | |
| return {byteify(key): byteify(value) | |
| for key, value in input.iteritems()} | |
| elif isinstance(input, list): | |
| return [byteify(element) for element in input] | |
| elif isinstance(input, unicode): | |
| return input.encode('utf-8') | |
| else: | |
| return input |
Here is a simplified version that removes the passphrase, ups the security to suppress warnings and includes a suggestion in comments to pass in -subj to remove the full question list:
$ openssl genrsa -des3 -out server.key 2048
$ openssl rsa -in server.key -out server.key
$ openssl req -sha256 -new -key server.key -out server.csr -subj '/CN=localhost'
$ openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crtReplace 'localhost' with whatever domain you require. You will need to run the first two commands one by one as openssl will prompt for a passphrase.
There are a few tools and ways out there:
| // Bonfire: Factorialize a Number | |
| // Author: @anasfullstack | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-factorialize-a-number | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function factorialize(num) { | |
| var factorial = 1; | |
| if (num > 1){ |
| // Bonfire: Reverse a String | |
| // Author: @anasfullstack | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-reverse-a-string | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function reverseString(str) { | |
| return str.split('').reverse().join(''); | |
| } | |
| reverseString("hello"); |