Skip to content

Instantly share code, notes, and snippets.

View datawebbie's full-sized avatar

Francis Park datawebbie

  • Greenpeace
  • Auckland, New Zealand
View GitHub Profile
@datawebbie
datawebbie / gist:478239206d063e7043e6eaf1b3264ec6
Created February 18, 2018 09:55
Regular expression for email address format validation
^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-?\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$
@datawebbie
datawebbie / index.html
Created March 16, 2017 02:05
Task 1 - Refactor this code
<!-- Instruction:
Fork this pen to your account, then do the "Task 2" on your forked pen. Provide the link to your forked pen with your answer. -->
<div id="forms">
<div class="forms_body_r">
<h2><span class="number1"></span>My contribution will be...</h2>
<form action="" method="post" name="myForm" id="myForm">
<div class="formcontent" style="margin-bottom: 0px;">
@datawebbie
datawebbie / middleman startup error
Created April 22, 2016 07:07
When you get an error when running "bundle exec middleman server/build"
# trying running suggested command
bundle install
# then you know you need to update eventmachine
bundle update eventmachine
eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
& eval 'exec perl -wS "$0" $argv:q'
if 0;
# Convert git log output to ChangeLog format.
my $VERSION = '2016-03-22 21:49'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
@datawebbie
datawebbie / async-aurora-embed
Created March 10, 2016 21:58
Loading Aurora Script Asynchronously
<script>
(function(s,o,g,a,m){a=s.createElement(o),m=s.getElementsByTagName(o)[0];
a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(document, 'script', 'https://aurora.grnpc.org/js/core/core.aurora.js');
</script>
1. 타루 - Rainy (0:00~ )*
2. 호란 & 시와 - 첫 마디​ (5:10~ )
3. 강아솔 - 엄마 (8:28~ )
4. 하현곤 팩토리 - 코끝이 찡하네 (12:55~ )
5. 헤이즈불루 - 소울메이트 (16:51~ )
6. 마리네이드 - 물고기 지도 (20:53~ )
7. 브리즈 - Try to Remember You (24:25~ )
8. 가을방학 - 첫사랑 (28:16~ )
9. 스텐딩에그 - Once Again (32:09~ )
10. 소심한 오빠들 - 내 마지막 이십대 (37:20~ )
@datawebbie
datawebbie / bg_css_pattern
Created January 5, 2015 18:28
background pattern
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAJklEQVQIW2NkYGD4D8QogBEkGBISwrBmzRq4BFgQq0qYIEwHVpUAVXsLAdW7wwsAAAAASUVORK5CYII=) repeat;
@datawebbie
datawebbie / generate-salt-random-string.php
Last active August 29, 2015 14:11
PHP function for generating random string with given length
/**
* This code was forked from http://online-code-generator.com/generate-salt-random-string.php
*/
<?php
function genKey($length) {
if($length > 0) {
$rand_id="";
for($i=1; $i <= $length; $i++) {
@datawebbie
datawebbie / how-to-do-things-on-mac
Last active August 29, 2015 14:09
Mac OS X web dev setup stuff
# Apache config reload (on Linux /etc/init.d/apache2 reload)
sudo apachectl -k gradeful
# Check Apache config error
apachectl configtest
# port check (if no nmap, brew cask install nmap)
nmap 127.0.0.1
@datawebbie
datawebbie / README.md
Last active August 29, 2015 14:08 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh