Skip to content

Instantly share code, notes, and snippets.

@deizel
deizel / tail.php
Created October 6, 2012 22:08
PHP log tail example
<?php
if (isset($_GET['ajax'])) {
session_start();
$handle = fopen('/private/var/log/system.log', 'r');
if (isset($_SESSION['offset'])) {
$data = stream_get_contents($handle, -1, $_SESSION['offset']);
echo nl2br($data);
} else {
fseek($handle, 0, SEEK_END);
$_SESSION['offset'] = ftell($handle);
@bhundven
bhundven / nineteen-wayland.sh
Last active January 21, 2019 20:21
Enlightenment 19 build script for Ubuntu/Debian with Wayland support.
#!/bin/bash
# vi: ts=4:sw=4:et
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu Wily/15.10 or Debian stretch/sid, or remove E19 git from your system.
# ********************************************************************
# * This version builds enlightenment with wayland. *
# * That means this requires a very recent Ubuntu or Debian version. *
# * This may not work properly! You've been warned! *
@shuhaowu
shuhaowu / debug-dnsmasq.sh
Created May 16, 2016 18:05
Debug dnsmasq by logging its queries
#!/bin/bash
echo 'log-queries' > /etc/dnsmasq.conf
service network-manager restart
tail -f /var/log/syslog
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active March 28, 2024 09:46
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@SteveClement
SteveClement / twotwo-wayland.sh
Last active February 28, 2024 10:08 — forked from bhundven/nineteen-wayland.sh
Enlightenment 22 build script for Ubuntu/Debian with Wayland support.
#!/bin/bash
# vi: ts=4:sw=4:et
#
# twotwo.sh
# This script allows you to install/update Enlightenment 22 git version on
# Ubuntu 18.04 or Debian buster (testing), or remove E22 git from your system.
# ********************************************************************
# * This version builds enlightenment with wayland. *
# * That means this requires a very recent Ubuntu or Debian version. *
# * This may not work properly! You've been warned! *