Skip to content

Instantly share code, notes, and snippets.

View ctrl-freak's full-sized avatar

Bryce Sheehan ctrl-freak

View GitHub Profile
@banaslee
banaslee / XGH - de-de.txt
Last active September 23, 2025 08:25
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.
@othtim
othtim / gist:5936927
Last active October 24, 2018 00:42
shows reads/writes on all tables in a DB as percentages. for choosing better indexes
--show stats on table reads/writes
Select
object_schema_name(UStat.object_id) + '.' + object_name(UStat.object_id) As [Object Name],
Case
When sum(User_Updates + User_Seeks + User_Scans + User_Lookups) = 0
Then Null
Else convert(decimal(5,2),round(Cast(sum(User_Seeks + User_Scans + User_Lookups) As Decimal)
/ Cast(sum(User_Updates
@othtim
othtim / gist:5936956
Created July 5, 2013 20:14
stats in pre- and post- reindex fragmentation
--save PRE stats on index fragmentation
IF OBJECT_ID('tempdb..#tmp_PRE_reindex', 'U') IS NOT NULL DROP TABLE #tmp_PRE_reindex
SELECT
ROW_NUMBER() over (order by sDips.index_id) as 'rowid',
OBJECT_NAME(sDips.OBJECT_ID) as 'objid',
@skymarionsky
skymarionsky / _autocomplete.php
Last active June 1, 2016 11:43 — forked from kenjis/_autocomplete.php
For FuelPHP, works on PHPStorm.
<?php
class Asset_Instance extends Fuel\Core\Asset_Instance {}
class Cache_Handler_Json extends Fuel\Core\Cache_Handler_Json {}
class Cache_Handler_Serialized extends Fuel\Core\Cache_Handler_Serialized {}
class Cache_Handler_String extends Fuel\Core\Cache_Handler_String {}
class Cache_Storage_Apc extends Fuel\Core\Cache_Storage_Apc {}
abstract class Cache_Storage_Driver extends Fuel\Core\Cache_Storage_Driver {}
class Cache_Storage_File extends Fuel\Core\Cache_Storage_File {}
class Cache_Storage_Memcached extends Fuel\Core\Cache_Storage_Memcached {}
$symbols = [PSCustomObject] @{
SMILEY_WHITE = ([char]9786)
SMILEY_BLACK = ([char]9787)
GEAR = ([char]9788)
HEART = ([char]9829)
DIAMOND = ([char]9830)
CLUB = ([char]9827)
SPADE = ([char]9824)
CIRCLE = ([char]8226)
NOTE1 = ([char]9834)
@jrioscloud
jrioscloud / Contract Killer 3.md
Created February 11, 2016 05:35
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@darkcolonist
darkcolonist / utf8ize.php
Last active July 24, 2025 03:27
utf8ize json encode fix
/**
* fixes the encoding of the values in an associative array
*
* usage:
* $formatted_rows = util::utf8ize($formatted_rows);
* echo json_encode($formatted_rows);
*
* @param assoc $arr array to be processed
* @return assoc processed array
*/
@CESARDELATORRE
CESARDELATORRE / git.migrate
Created October 10, 2016 18:51 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@smithclay
smithclay / index.js
Created June 16, 2017 18:30
"Hello World" AWS Lambda + Terraform Example
// 'Hello World' nodejs6.10 runtime AWS Lambda function
exports.handler = (event, context, callback) => {
console.log('Hello, logs!');
callback(null, 'great success');
}
@axieum
axieum / BAT File Add to New Context Menu.reg
Last active November 10, 2020 03:08
Windows 10 Quality of Life Tools
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.bat\ShellNew]
"NullFile"=""