Skip to content

Instantly share code, notes, and snippets.

View 0x46616c6b's full-sized avatar

0x46616c6b 0x46616c6b

  • Dresden
  • 10:47 (UTC +02:00)
View GitHub Profile
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@klange
klange / _.md
Last active December 23, 2024 14:40
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@reyjrar
reyjrar / elasticsearch.yml
Last active December 26, 2024 21:46
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@analytically
analytically / gist:5760207
Created June 11, 2013 20:13
Ansible /etc/network/interfaces template
# {{ ansible_managed }}
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
{% if ansible_interfaces|length > 2 %}
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@Dynom
Dynom / gist:5866837
Last active December 5, 2017 14:05
Creating ISO 8601-extended in PHP, using DateTime. This includes milliseconds (and if you want, microseconds). Based on the work mentioned here: http://stackoverflow.com/a/4414060/1061927
<?php
// Our input
$time = microtime(true);
// Determining the microsecond fraction
$microSeconds = sprintf("%06d", ($time - floor($time)) * 1000000);
// Creating our DT object
$tz = new DateTimeZone("Etc/UTC"); // NOT using a TZ yields the same result, and is actually quite a bit faster. This serves just as an example.
@tPl0ch
tPl0ch / CommandContext.php
Last active August 18, 2023 11:18
A CommandContext for Behat tests of Symfony Console Commands
<?php
namespace MFB\Behat\Subcontext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\MinkExtension\Context\RawMinkContext;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\EventDispatcher\EventDispatcher;
/**
@trooney
trooney / dev.yml
Last active December 28, 2015 07:49
Ansible | Dev Environment
---
- hosts: all
sudo: True
pre_tasks:
- name: APT | Check cache update time
stat: path=/var/cache/apt
register: apt_cache_stat
- name: APT | Update stale cache
apt: update_cache=yes
@matyix
matyix / Hoya-exception
Created March 17, 2014 09:59
Hoya exception - Application doesn't exist in cache
2014-03-17 10:41:31,833 [AMRM Callback Handler Thread] INFO HoyaAppMaster.yarn - Shutdown Request received
2014-03-17 10:41:31,841 [AMRM Callback Handler Thread] INFO impl.AMRMClientAsyncImpl - Shutdown requested. Stopping callback.
2014-03-17 10:41:32,841 [main] INFO appmaster.HoyaAppMaster - Triggering shutdown of the AM: Shutdown requested from RM
2014-03-17 10:41:32,842 [main] INFO appmaster.HoyaAppMaster - Process has exited with exit code 0 mapped to 0 -ignoring
2014-03-17 10:41:32,843 [main] INFO state.AppState - Releasing 1 containers
2014-03-17 10:41:32,843 [main] INFO appmaster.HoyaAppMaster - Application completed. Signalling finish to RM
2014-03-17 10:41:32,843 [main] INFO appmaster.HoyaAppMaster - Unregistering AM status=FAILED message=Shutdown requested from RM
2014-03-17 10:41:32,855 [main] INFO appmaster.HoyaAppMaster - Failed to unregister application: org.apache.hadoop.yarn.exceptions.InvalidApplicationMasterRequestException: Application doesn't exist in cache appattempt_139504910217
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#