aramk.com
域名年龄: 11年11个月16天HTTP/1.1 200 OK 服务器:nginx 访问时间:2015年08月19日 07:52:45 类型:text/html Transfer-Encoding: chunked 连接:关闭 动作:Accept-Encoding 过期时间:2015年08月19日 07:52:44 缓存控制:不缓存 Content-Encoding: gzip
Aram KocharyanBlogArchivesRSSMay 28th, 2013Hello Jekyll, Goodbye WordpressSo my Wordpress site got hacked rather badly recently and 000webhost canceled my free hosting:Realising the amount of effort I put into writing templates, uploading huge amounts of files and using crappy FTP connections, I looked for a better way to post stuff.Jekyll is a static website generator written in Ruby, is very light and didn’t take nearly as much time to install, even though I had to set up DNS records again.Take a look at the source branch of this website.Fork the repo and checkout both the source and master branches.Make some changes to the site in the source branch and push them.Run publish.sh, which will build the site in the master branch and push it.If you’re hosting a Project Page instead of a User Page, you need to push to a gh-pages branch instead, so edit publish.sh to your needs. See the GitHub Pages guide.This has some setbacks – even though I installed the Wordpress importer like so:sudo gem install jekyll-import --preAnd followed their importing guide, my old posts are more or less broken. But I think cleaning them up will be a more long term solution, and I don’t need a PHP server anymore :)I plan to port Crayon eventually, but that’s another story.Jan 15th, 2013Minimizing Code in CrayonIn the latest version of Crayon, you can choose to hide the code until the user expands it. This doesn’t apply to inline code. You can enable/disable it for individual Crayons using the Tag Editor.If a title is set in the Tag Editor it is used in place of “Click To Expand Code”.Jan 3rd, 2013Creating a Simple Wordpress WidgetHere’s a Wordpress widget base class which reduces the amount of code needed to create a simple widget with fields. Allows overriding a method adding more complex fields. This code should be placed in your theme’s function.php file. You can then subclass Field_Widget whenever you like by following the example given.Thanks to http://frobert.com/en/2010/12/10/wordpress-widget-tutorial/ for sharing tips on how to use WP_Widget.Dec 30th, 2012PHP: Sending an Email AttachmentHere’s my adapted version of sending an email attachment and allowing HTML and plain encodings.emailFile(array('to' => 'your@email.com','from' => 'my@email.com','subject' => 'Some Subject','message' => '<b>Hello!</b>','plain ' => 'Get a new email client!','file' => '/path/to/file'));/*** Sends an email in html and plain encodings with a file attachment.** @param array $args Arguments associative array* 'to' (string)* 'from' (string)* 'subject' (optional string)* 'message' (HTML string)* 'plain' (optional plain string)* 'file' (optional file path of the attachment)* @see http://webcheatsheet.com/php/send_email_text_html_attachment.php*/function emailFile($args) {$to = set_default($args['to']);$from = set_default($args['from']);$subject = set_default($args['su
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2024-12-28 09:49, Process in 0.0119 second.