Skip to content

Instantly share code, notes, and snippets.

Christian Lück clue

Block or report user

Report or block clue

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ProPheT777
ProPheT777 / Dockerfile
Last active Aug 14, 2018
PPM under PHAR
View Dockerfile
FROM php-cgi #custom
COPY api.phar /api.phar
EXPOSE 8888
CMD ["/api.phar", "start", "-c", "ppm.json"]
@miohtama
miohtama / purge_logs.sh
Created Jan 27, 2017
Remove old logs from Quassel SQLite database
View purge_logs.sh
#!/bin/sh
BAK_PATH="${HOME}/.config/quassel-irc.org/quassel-storage.sqlite.bak"
CURRENT_PATH="${HOME}/.config/quassel-irc.org/quassel-storage.sqlite"
# first day of data that will be maintained
# -15 day means that *every* chatline stored before 16 days ago and so on are going to be eliminated.
# only the last 15 days are keeped.
DATE_TO_PRUNE='-15 day'
die() {
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active Aug 20, 2019
HTTP Streaming (or Chunked vs Store & Forward)
View http_streaming.md

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@ImJasonH
ImJasonH / markdown.css
Last active Jul 29, 2019
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active Feb 1, 2019
A unit testing framework in a tweet.
View TestFrameworkInATweet.php
<?php
function it($m,$p){echo ($p?'✔︎':'')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@padraic
padraic / checksslcontext.php
Last active Nov 16, 2016
Correct SSL/TLS Context Settings for file_get_contents() and other PHP stream calls under PHP 5.5 (or earlier)
View checksslcontext.php
<?php
ini_set('display_errors', 1);
/**
* This script check how PHP makes HTTPS (SSL/TLS) requests using PHP Streams
* or cURL. Configuration options are passed as GET parameters, for example:
* http://localhost/checksslcontext.php?reconfigure=1
*
* Configuration:
* http://localhost/checksslcontext.php
* Basic PHP Streams using file_get_contents(). Default settings.
@emiller
emiller / git-mv-with-history
Last active Aug 16, 2019
git utility to move/rename file or folder and retain history with it.
View git-mv-with-history
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@jbenet
jbenet / simple-git-branching-model.md
Last active Aug 20, 2019
a simple git branching model
View simple-git-branching-model.md

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

View pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
@Blackshawk
Blackshawk / blog - Explaining My Choices Further.md
Last active Mar 5, 2017
In which I do a little digging about the choices I've made with PHP. This is a long read, but it isn't something that can be explained in one or two paragraphs.
View blog - Explaining My Choices Further.md

In the comments from my last post and on Twitter I noticed a lot of people who had something to say about PHP. The comments were varied but they usally sounded something like this (sorry @ipetepete, I picked yours because it was the shortest).

...the little bits of soul from all of us who've had to work on, and or maintain large PHP applications. – ipetepete

In Pete's defense, he did go on to say that rest of the stack I was using was a "smorgasbord of awesome". Thanks, Pete. I agree!

I would, however, like to take a little time to correct a misperception in the developer community about PHP. I recently got into this same... discussion... with Jeff Atwood, and I seem to be running into it more and more. So here goes. Please bear with me as I cover a little history further on.

Pete, and everybody else, _you're exactly rig

You can’t perform that action at this time.