Skip to content

Instantly share code, notes, and snippets.

pathadds=(
~/bin
/usr/local/bin
/usr/local/sbin
/usr/local/share/npm/bin
)
manpathadds=(
/usr/local/share/man
)
OLD_IFS="$IFS"
@vhata
vhata / gist:6132848
Created August 1, 2013 16:12
gem list
activesupport (3.2.14)
addressable (2.3.5)
app_conf (0.4.1)
boom (0.3.0)
bundler (1.3.5)
chef (11.6.0)
choice (0.1.6)
classifier (1.3.3)
coderay (1.0.9)
colorator (0.1)
@vhata
vhata / gist:6131338
Last active December 20, 2015 12:29
def test_organisation_members(self):
def members_response():
yield [
{
'login': 'jed',
'url': 'https://api.github.com/users/jed'
},
{
'login': 'matt',
'url': 'https://api.github.com/users/matt'
08:55 -!- AKASkip [farrel@atrum-evok6b.mtnbusiness.co.za] has quit [Ping timeout: 181 seconds]
09:31 -!- AKASkip [farrel@atrum-s06sqm.mtnbusiness.co.za] has joined #clug
13:45 -!- lifeboy [roland@atrum-34vibi.mtnbusiness.co.za] has quit [Ping timeout: 181 seconds]
14:14 -!- lifeboy [roland@atrum-6dlerl.mtnbusiness.co.za] has joined #clug
14:27 -!- lifeboy [roland@atrum-6dlerl.mtnbusiness.co.za] has quit [Ping timeout: 181 seconds]
14:29 -!- lifeboy [roland@atrum-450ctb.mtnbusiness.co.za] has joined #clug
16:44 -!- Vince_0 [vincent@atrum-9fmr63.mtnbusiness.co.za] has quit [Quit: Leaving]
17:45 -!- AKASkip [farrel@atrum-s06sqm.mtnbusiness.co.za] has quit [Ping timeout: 181 seconds]
19:04 -!- AKASkip [farrel@atrum-evok6b.mtnbusiness.co.za] has joined #clug
01:27 -!- AKASkip [farrel@atrum-evok6b.mtnbusiness.co.za] has quit [Ping timeout: 181 seconds]

I called the labour department on 021 4685500.

You will need to register as an employer, if you haven't done so already.

You will need the ID number of your employee.

You will have to fill in a few forms, which you can either download from the internet, or if you phone them they will fax the forms to you, or you can call on the municipal offices in Ocean View to collect the forms.

The forms you need to fill in are UI19D and UI8D.

15:15 <confluence> Why do people not put spaces in their code? Itmakesthecodelooklikeass.
15:16 <confluence> Spinach: people --
15:17 <confluence> At least I'm the only person working on this, so I can commit readability fixes as much as I want and nobody will complain.
15:17 <Vhata> people complain about readability fixes?
15:18 <Vhata> I suppose I complain about readability fixes when they are in more than three or less than one commit
15:20 <mithrandi> people complain about readability fixes because they don't agree on readability
15:22 <confluence> I think few people would disagree that thing<otherthing->property is better written as thing < otherthing->property.
15:28 <mithrandi> I'm definitely in favour of spaces around operators, but I've run into a few people that intensely dislike them
15:34 <Vhata> we just go with PEP8
15:34 <Vhata> we all disagree with bits of PEP8, but they're all different bits
17:05 <Cow> warpeddragon: it's a bug
17:05 <Cow> try again
17:05 <Cow> should be sawted
17:06 <Vhata> you're a bug
17:06 <Cow> no u
17:06 <warpeddragon> will both me and russell be safe now?
17:06 <Cow> totally 100%
17:06 <warpeddragon> and can I connect more then ocne from my server?
17:06 <Cow> trust me
17:06 <Cow> oh yeah def
@vhata
vhata / cats.md
Last active December 19, 2015 05:29

Cats from countries not recognized by Canada as being rabies-free may enter Canada if they are accompanied by a rabies vaccination certificate. South Africa is not regarded as being rabies free.

The Rabies Vaccination Certificate must:

  • be written in English or French;
  • be issued and signed by a licensed veterinarian;
  • identify the animal (as in breed, colour, and weight);
  • state that the animal is vaccinated against rabies;
  • indicate the date of vaccination;
  • indicate the trade name and the serial number of the licensed vaccine; and
@vhata
vhata / pep8.js
Created June 21, 2013 10:40
Bookmarklet to tell an intern to PEP8 their code in a pull request.
$.post(
// for an issue, use: document.URL.replace(/\/issue.*/,'/issue_comments'),
// a check in the URL to use whichever is relevant would be great
document.URL + '/comment',
{
'authenticity_token': $('meta[name="csrf-token"]').attr('content'),
'issue': document.URL.split('/').slice(-1)[0],
'comment[body]': 'Please PEP8 this'
});
@vhata
vhata / short-amazon.js
Last active December 18, 2015 11:08
Bookmarklet to shorten Amazon URLs
javascript:var%20url=document.location.href;var%20dp_re=/\/dp\//;var%20gp_re=/\/gp\/product\//;if(dp_re.test(url)){location=url.replace(/^(http:\/\/[^\/]+).*(\/dp\/[^\/]+)\/.*$/,%22$1$2%22);}else%20if(gp_re.test(url)){location=url.replace(/^(http:\/\/[^\/]+).*(\/gp\/product\/[^\/]+)\/.*$/,%22$1$2%22);}else{alert(%22Unrecognized%20URL%20format%22);}
Javascript is as follows:
var url = document.location.href;
var dp_re = /\/dp/;
var gp_re = /\/gp\/product\//;
if (dp_re.test(url)) {
location = url.replace(/^(http:\/\/[^\/]+).*(\/dp\/[^\/]+)\/.*$/, "$1$2" );
}