Skip to content

Instantly share code, notes, and snippets.

@ismasan
ismasan / gist:3804361
Created September 29, 2012 15:32 — forked from mattetti/gist:3798173
async fetching of urls using goroutines and channels
package main
import (
"fmt"
"net/http"
"time"
)
var urls = []string{
"http://pulsoconf.co/",
@banaslee
banaslee / XGH - de-de.txt
Last active January 23, 2026 14:49
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Quelle: http://gohorseprocess.wordpress.com
Übersetzung ursprünglich von https://gist.github.com/Neffez/f8d907ba8289f14e23f3855011fa4e2f
1. Ich denke, also ist es nicht XGH.
In XGH wird nicht gedacht, es wird das erste gemacht, was in den Sinn kommt. Es gibt auch keine zweite Option, die erste ist schneller.
2. Es gibt 3 Wege ein Problem zu lösen: den richtigen Weg, den falschen Weg und den XGH Weg, welcher exakt wie der falsche ist, aber schneller.
@mbostock
mbostock / .block
Last active January 11, 2026 04:51
Collapsible Tree
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-collapsible-tree
@coreymcmahon
coreymcmahon / User.php
Created February 9, 2013 11:43
Our User model, version 2.0. From the article: PDO for Elegant PHP Database Access, http://www.modernphpbook.com/articles/pdo-for-elegant-php-database-access - Fig 11
<?php
class User
{
public $id;
public $username;
public $firstname;
public $lastname;
public $email;
@coreymcmahon
coreymcmahon / UserRepository.php
Last active October 30, 2016 18:37
Our User repository, version 2.0. From the article: PDO for Elegant PHP Database Access, http://www.modernphpbook.com/articles/pdo-for-elegant-php-database-access - Fig 12
<?php
namespace Repository;
use \PDO;
class UserRepository
{
private $connection;
<?php
namespace Service;
class TwitterAPI
{
private $httpClient;
public function __construct($httpClient = null)
{
$this->httpClient = $httpClient;
@barryvdh
barryvdh / _ide_helper.php
Last active December 21, 2025 15:33
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@trepmal
trepmal / gist:5305893
Last active December 15, 2015 18:39
WordPress priv/nopriv demo
<?php
/*
* Plugin Name: Ajax Test
* Plugin URI: trepmal.com
* Description:
* Version:
* Author: Kailey Lampert
* Author URI: kaileylampert.com
* License: GPLv2 or later
* TextDomain: some-plugin
@yanofsky
yanofsky / LICENSE
Last active January 27, 2026 19:04
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@jmoiron
jmoiron / valuer.go
Created October 14, 2013 18:03
Example uses of sql.Scanner and driver.Valuer
package main
import (
"bytes"
"compress/gzip"
"database/sql/driver"
"errors"
"fmt"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"