Skip to content

Instantly share code, notes, and snippets.

@pheisiph
pheisiph / metas.md
Created June 7, 2018 08:36 — forked from tcelestino/metas.md
meta tags

#Meta Tags

<!---favicon-->
<link rel="icon" href="http://www.example.com/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://www.example.com/favicon.ico" type="image/x-icon">

<!--Apple Touch Icon for iPad and iPhone Meta Tag-->
<link rel="apple-touch-icon" href="http://www.example.com/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="http://www.example.com/apple-touch-icon.png">
@pheisiph
pheisiph / meta-tags.md
Created June 5, 2018 15:42 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@pheisiph
pheisiph / nokogiri.sh
Last active March 26, 2017 11:53
Nokogiri
$ gem install nokogiri -- \
--with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 \
--use-system-libraries
@pheisiph
pheisiph / example_activejob.rb
Created May 12, 2016 12:02 — forked from ChuckJHardy/example_activejob.rb
Example ActiveJob with RSpec Tests
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
end
def perform(*args)
MyService.call(*args)
end
@pheisiph
pheisiph / Ninjablock_to_local_mqtt.sh
Created February 1, 2016 16:29 — forked from svrooij/Ninjablock_to_local_mqtt.sh
Ninjablock to local MQTT server
# This describes how you can connect your ninjablock to your own mqtt server
# It is not the best manual, so please provide feedback
# First of you have to start with the "beta" image found at: https://discuss.ninjablocks.com/t/unstable-brand-new-image-for-your-block/1666
# Or direct link if you must: http://ninjablocks-nightly.s3.amazonaws.com/block/ubuntu_armhf_trusty_sterling_block-unstable_2014-07-16_1044.img.gz
# Then put that on an sdcard (like you normally would)
# Put it in the ninjablock
# Let it boot!!
# power off (upon first boot it creates a ssh key (needed for enabling ssh))
# power on
use Rex -base;
use YAML;
use Data::Dumper;
desc 'read from yaml';
task 'readyaml', sub {
my $yaml_info = YAML::LoadFile('info_in.yml');
say Dumper($yaml_info);
};
@pheisiph
pheisiph / rexify_osx.sh
Last active April 26, 2016 13:24
Installing Rex on OS X isn't exactly straightforward. This is the best I could come up with.
# rexify OS X - install (R)?ex on OS X
# Installing (R)?ex (http://www.rexify.org) on OS X is a bit more involved
# and the documentation recomends MacPorts (https://macports.org/), even though
# we've collectively moved on towards the excellent Homebrew (http://brew.sh).
# They also suggest using perlbrew (http://perlbrew.pl), but then proceed
# installing Rex globally requiring sudo, which is exactly what perlbrew tries to
# avoid. Luckily Rex is available as a cpan module.
#
# I also installed homebrew in a different directory, in order to support multiple

Keybase proof

I hereby claim:

  • I am darph on github.
  • I am darph (https://keybase.io/darph) on keybase.
  • I have a public key whose fingerprint is EE38 60B3 78C9 998B 39A4 65AC 0208 EE49 293F 2444

To claim this, I am signing this object:

zh:大家好
jp:今日は
thai:สวัสดี
ko: 안녕하세요
@pheisiph
pheisiph / config.ru
Created March 20, 2014 09:36
Redirect all requests to new domain
require 'rack/rewrite'
use Rack::Rewrite do
r301 %r{/(.*)}, 'https://somewhere.else.website/$1'
end
run lambda { |env| [200, {"Content-Type" => "text/plain"}, ["You shouldn't get here."]] }