Skip to content

Instantly share code, notes, and snippets.

View henrikakselsen's full-sized avatar

Henrik Akselsen henrikakselsen

  • Frontkom
  • Norway
View GitHub Profile
@captflint
captflint / bloodsquares.py
Created January 5, 2015 20:59
bloodyboard
import sys
print('loading file')
pgnfile = open(sys.argv[1], 'rb')
glob = pgnfile.read()
print('done')
print('convertingbytes')
pgn = ''
for b in glob:
c = chr(b)
pgn += c
@perandre
perandre / pesh-terminal
Created July 18, 2014 10:43
Terminal short cuts
# pesh stuff
alias a="open -a Atom"
alias vhost="open -a Atom /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf /etc/hosts"
alias zsh="open -a Atom ~/.zshrc"
alias log="open -a Atom ~/Sites/log"
alias c="bundle exec compass watch"
# alias clone="echo 'git clone git@github.com:front/'| pbcopy"
## NF settings
alias nfa='cd ~/Sites/front/newsfront-drupal/sites/all && open ~/Sites/front/newsfront-drupal/sites/all'
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@brankoajzele
brankoajzele / cerToPem.php
Created January 21, 2013 13:13
Converting .cer to .pem via pure PHP, (no system, backticks, shell_exec, exec, etc.) to get the same result as with "openssl x509 -inform der -in cert.cer -out cert.pem". Note, I am not expert on certificates, etc. This specific certificate conversion simply worked for me.
<?php
$certificateCAcer = '/certificate.cer';
$certificateCAcerContent = file_get_contents($certificateCAcer);
/* Convert .cer to .pem, cURL uses .pem */
$certificateCApemContent = '-----BEGIN CERTIFICATE-----'.PHP_EOL
.chunk_split(base64_encode($certificateCAcerContent), 64, PHP_EOL)
.'-----END CERTIFICATE-----'.PHP_EOL;