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 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <folder_path>" | |
exit 1 | |
fi | |
generate_id() { | |
echo $(( RANDOM % 1000 + 1 )) | |
} |
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
# to split the file | |
split -l 100000 -d filename.csv file_ | |
# to add the csv extension to each of the files | |
for i in $(find file_*); do mv $i "$i.csv"; done | |
# to put the header from the first file into each of the other files | |
for i in $(find . -type f -name "file_*.csv" -not -name "file_00.csv"); | |
do echo -e "$(head -1 file_00.csv)\n$(cat $i)" > $i; | |
done |
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
# to encrypt | |
openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc | |
# to decrypt | |
openssl enc -d -aes-256-cbc -a -in file.enc -out file.txt |
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
@mixin fullHeigtWithoutBottomInset { | |
height: 100vh; | |
@supports (height: -webkit-fill-available) { | |
height: -webkit-fill-available; | |
} | |
} |
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 map = new Map([[1, 'one'][2, 'two']]) | |
map.forEach(val => { | |
console.log(val) | |
} |
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
<!-- embed a single area --> | |
<div id="stylaMagazine" data-area="fashion"></div> | |
<script src="https://client-scripts.styla.com/scripts/clients/your-brand.js" async="" type="text/javascript" xml="space"></script> | |
<!-- end --> | |
<!-- embed multiple areas in the same page --> | |
<!-- this goes in <head> --> | |
<script src="http://client-scripts.styla.com/scripts/clients/your-brand.js" async type="text/javascript"></script> |
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
//connect to VPN | |
wg-quick up prod | |
//turn off | |
wg-quick down prod |
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
{extends file='parent:frontend/custom/index.tpl'} | |
{block name='frontend_index_header'} | |
{include file='frontend/magazin/header.tpl'} | |
{/block} | |
{* Sidebar left *} | |
{block name='frontend_index_content_left'} | |
{$smarty.block.parent} | |
<style> |
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
{extends file='parent:frontend/custom/index.tpl'} | |
{block name='frontend_index_header'} | |
{include file='frontend/magazin/header.tpl'} | |
{/block} | |
{block name="frontend_index_content_left"} | |
<style> | |
#gLeft { display:none; } |
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
public function postDispatch(){ | |
$type = $this->_feed_params['type']; | |
$js_include = StylaUtils::getJsEmbedCode($this->_username, $this->_snippet_url); | |
$ret = null; | |
$path = StylaUtils::getCurrentPath($this->_base_dir); | |
//disabling call to SEO API | |
//$ret = StylaUtils::getRemoteContent($this->_username, $path, $this->_url_query_params, $this->_source_url); |
NewerOlder