Skip to content

Instantly share code, notes, and snippets.

/etc/systemd/system/renew-letsencrypt.service
[Unit]
Description=Renew Let's Encrypt certificates
After=network-online.target
[Service]
Type=oneshot
# check for renewal, only start/stop nginx if certs need to be renewed
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
imapsync --nosyncacls --syncinternaldates --nofoldersizes --skipsize --buffersize 8192000 --exclude 'Trash|NoSpam|NewSpam|Junk|Spam|Deleted Items' --host1 webmail.MASKED.com --user1 [email protected] --passfile1 /root/pass1 --host2 mail.MASKED.com --user2 [email protected] --passfile2 /root/pass2 --tls2
https://www.google.com/fusiontables/DataSource?docid=1qwHuS2zIBqK_xxTtg-j_loRHqCVpcld-a2Q6kM0#rows:id=1
Emergency Preparedness
Pioneering Wireless
Offbeat Internet
Application Software
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
<TriggerPackage>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>DBI Triggers Group</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
@samjaninf
samjaninf / Blockchain.jl
Created August 16, 2018 17:33 — forked from TestSubjector/Blockchain.jl
A very basic implementation of a blockchain in Julia.
using SHA
"""
An individual block structure
"""
struct Block
index::Int
timestamp::DateTime
data::String
previous_hash::String
server {
listen 80;
listen 443 ssl http2;
server_name your.mautic.location;
root /your/mautic/path ;
server_tokens off;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
@samjaninf
samjaninf / install odoo 11 centos
Last active November 19, 2018 20:56
install odoo 11 centos
cd ~
adduser --system --shell=/bin/bash --home-dir=/opt/odoo --user-group odoo
yum -y groupinstall "development tools"
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36u python36u-pip python36u-devel wget unzip postgresql-devel npm nodejs git libjpeg-devel libxml2-devel libxslt-devel openldap-devel cyrus-sasl-devel
pip3.6 install --upgrade pip
ln -s /usr/bin/python3.6 /usr/bin/python3
wget -nc https://github.com/odoo/odoo/archive/11.0.zip -O archive.zip
unzip -nq archive.zip
mkdir -p /opt/odoo
#### Exercises
1. Define and compare recursion and iteration.
Recursion is a procedure that calls itself until a certain condition (base case) is reached. Recursive solutions can be slower and are subjected to system limitations
Iteration is a procedure that uses loop to repeat a process. Iterative solutions may be harder to implement.
2. Name five algorithms that are commonly implemented by recursion.
@samjaninf
samjaninf / The Technical Interview Cheat Sheet.md
Created September 26, 2018 01:08 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@samjaninf
samjaninf / to_array.js
Created September 26, 2018 18:36 — forked from pcbje/to_array.js
Convert tabular text (csv, tsv, etc.) to javascript array
var to_array = function(text, delimeter, has_header, header_size) {
var lines = text.split('\n');
var columns = has_header ? lines[header_size - 1].split(delimeter) : null;
var rows = [];
for (var i=header_size; i<lines.length; i++) {
var array = lines[i].split(delimeter);
var row = {};
for (var j in array) {