This file contains hidden or 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
from sparkpost import EmailMessage | |
email = EmailMessage('New message in your inbox!', template='welcome') | |
email.send() |
This file contains hidden or 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
<?xml version="1.0"?> | |
<rss xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/" version="2.0"><channel><title>Cyril's blog</title><link>http://blog.cnicodeme.com</link><description>Adventures of an entrepreneur</description><pubDate>Thu, 20 Oct 2016 09:02:39 +0000</pubDate><language>en-US</language><wp:wxr_version xmlns:wp="wp">1.2</wp:wxr_version><wp:base_site_url xmlns:wp="wp">http://cnicodeme.com</wp:base_site_url><wp:base_blog_url xmlns:wp="wp">http://blog.cnicodeme.com</wp:base_blog_url><generator>https://wordpress.org/?v=4.6.1</generator><item><title>Taille de certaines balises HTML pour les moteurs de recherche</title><link>http://blog.reflectiv.net/taille-de-certaines-balises-html-pour-les-mot</link><pubDate>Mon, 17 May 2010 17:37:00 +0000</pubDate><dc:creator><![CDATA[Cyril Nicodème]]></dc:creator><guid is |
This file contains hidden or 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
<?php | |
date_default_timezone_set('UTC'); | |
define('DATE_FORMAT', '%a, %d %b %Y %H:%M:%S +0000'); | |
$domain = 'blog.cnicodeme.com'; | |
$blogId = 1; | |
$pdo = new PDO('mysql:dbname=postera;host=127.0.0.1', 'root', '', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'')); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains hidden or 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 | |
dnf -y remove cheese evolution libreoffice* shotwell empathy | |
# Installing repositories | |
dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | |
dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | |
dnf -y install http://rpms.famillecollet.com/fedora/remi-release-24.rpm | |
# Installing Google Chrome repository |
This file contains hidden or 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
import logging, argparse | |
import apache_beam as beam | |
from apache_beam.io import gcsio | |
from apache_beam.utils.options import PipelineOptions | |
from openpyxl import load_workbook | |
# @See https://cloud.google.com/dataflow/model/custom-io-python#ptransform-wrappers |
This file contains hidden or 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 | |
# | |
# -------------------------------------------------------------------- | |
# This is a free shell script under GNU GPL version 3.0 or above | |
# Copyright (C) 2005 ReFlectiv project. | |
# Feedback/comment/suggestions : http://www.reflectiv.net/ | |
# ------------------------------------------------------------------------- | |
# | |
# This script automatically set up a new *Debian* server (IMPORTANT : Debian!), by doing these actions : | |
# |
This file contains hidden or 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 | |
# First of all, we check if the user is root | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# Changing the password of the root user | |
read -e -p "Do you want to change the root password? [Y/n] : " change_password |
This file contains hidden or 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
# -*- config:utf-8 -*- | |
import socket, select, re, logging | |
from io import BytesIO | |
divider_pattern = re.compile(br'^(.*?)\r?\n(.*?)\r?\n\r?\n', re.DOTALL) | |
first_line_pattern = re.compile(br'^SPAMD/[^ ]+ 0 EX_OK$') | |
This file contains hidden or 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 | |
read -e -p "Project Name: " project_name | |
mkdir -p "/var/www/$project_name/project.git" | |
cd "/var/www/$project_name/project.git" | |
git init --bare | |
cd "/var/www/$project_name/" |
This file contains hidden or 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
<?php | |
/** | |
* Example of usage: | |
* ``` | |
* pdfshift('your_api_key', array( | |
* 'source' => 'http://www.example.com', | |
* 'use_print' => true | |
* )); | |
*/ | |
function pdfshift($apiKey, $params) { |