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
var zlib = require('zlib'); | |
var gzip = zlib.createGzip(); | |
var input = 'file not found'; | |
var compressed = ''; | |
zlib.deflate(input, function(err, buffer){ | |
console.log(buffer); | |
console.log(buffer.toString()); | |
console.log(buffer.toString('base64')); | |
compressed = buffer.toString('base64'); |
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
// if you need the injector from the console | |
var injector = angular.element('html').injector(); | |
// you can then do something like: | |
// var dateFilter = injector.get('dateFilter'); | |
// dateFilter('date', 'type'); |
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
#!/bin/bash | |
# point to the directory where the config files are stored | |
CONFIG_DIR="/path/to/your/dir/" | |
cd $CONFIG_DIR | |
if [ "$1" == "" ]; then | |
DIRECTORY=$(ls -al | awk '{print $1,$9}' | grep -i ^\- | awk '{print $2}'); | |
else |