Skip to content

Instantly share code, notes, and snippets.

View hkdobrev's full-sized avatar

Harry Dobrev hkdobrev

View GitHub Profile
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@donnut
donnut / currying.md
Last active October 28, 2023 17:58
TypeScript and currying

TypeScript and currying

In functional programming you often want to apply a function partly. A simple example is a function add. It would be nice if we could use add like:

var res2 = add(1, 3); // => 4

var add10To = add(10);
var res = add10To(5); // => 15
@sylvaincombes
sylvaincombes / my-external-ip.sh
Last active April 22, 2024 07:08
View your external ip from linux / unix shell
# with dig (fastest way)
dig +short myip.opendns.com @resolver1.opendns.com;
# alternative
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}';
######################################################################################################
## Other method with curl / get and 3rd party, this choice is less judicious
######################################################################################################
# with curl
@ngauthier
ngauthier / tips.md
Created July 24, 2014 14:32
Nick's Trello Tips
  1. Only keep the members who need to do something (blocking) the card on the card. Not everyone involved. After you do your part, take yourself off the card, and possibly add someone else to the card if it's their turn. It's important that all the cards with your face on it need you to do something. No false-positives.
  2. If you need someone's opinion on a card but they don't have to do something, just mention in a comment
  3. The description is the current state of the task, not a history of the evolution of the task. Comments are a history of the discussion that yields the description
  4. Use labels to indicate the kind of card, not state (e.g. "bug" but not "in qa"). Alternatively, have a code system in the card title. For example, we process data in batches. Batches have one to two letters to indicate client and numbers that increment. So IS42 is Internal Sales batch #42. This is nice when the label needs to be a little different each time. Instead of a label, put it at the beginning of the title.
  5. Use
@lyrixx
lyrixx / segfault-finder.php
Last active August 15, 2023 21:17
How to find a segfault in PHP
<?php
register_tick_function(function() {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
$last = reset($bt);
$info = sprintf("%s +%d\n", $last['file'], $last['line']);
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND);
// or
// file_put_contents('php://output', $info, FILE_APPEND);
});
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@KyleJamesWalker
KyleJamesWalker / VagrantSSHAngentForwardingWithAnsible.md
Last active December 10, 2019 01:37
Vagrant SSH Agent Forwarding Working 1.4.3

This was working on Vagrant 1.4.3 (Mac).

#HOST#

File: ~/.ssh/config

Host vagrant.*
ForwardAgent yes

File: Vagrantfile

@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@L422Y
L422Y / osx_automount_nfs.md
Last active May 10, 2024 09:06
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@hkdobrev
hkdobrev / class-order.php
Last active May 15, 2024 16:56
PHP convention for the order in a class.
<?php namespace Vendor\Library;
use Another\Vendor\Library\ClassName;
abstract class ClassName extends AnotherClass implements Countable, Serializable
{
const CONSTANTS = 'top';
use someTrait, anotherTrait {
anotherTrait::traitMethod insteadof someTrait;