Skip to content

Instantly share code, notes, and snippets.

@jniltinho
jniltinho / install_pagespeed_nginx.sh
Last active June 26, 2023 19:41
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
#!/bin/bash
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-16-04/
## http://nginx.org/en/linux_packages.html
## https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/
## Debian ISO: https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## https://github.com/jniltinho/ispconfig/tree/master/packages/debian/jessie
## Run as root (sudo su)
@kkAyataka
kkAyataka / datetime_to_string_to.py
Last active June 14, 2022 16:13
Python datetime to iso format string and iso format string to datetime
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""datetimeとISO 8601文字列の変換"""
import datetime
# datetimeからISO 8601を得る
d = datetime.datetime(2014, 11, 11, 9)
print d.isoformat() # 2014-11-11T09:00:00
@BusterNeece
BusterNeece / broadcast.sh
Created May 13, 2017 03:29
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"
int[] lines = new int[10];
int counter = 0;
float startTime, currTime;
float hitTime;
float bpm = 170;
PShape bassDrum;
@yendor
yendor / ParallelTask.php
Created November 14, 2011 05:54
Base class for doing forked, parallel execution in PHP easily
<?php
class ParallelTask
{
protected $pid = null;
public $max_workers = 8;
protected $num_workers = 0;
public function run()