Skip to content

Instantly share code, notes, and snippets.

View clasense4's full-sized avatar
🎯
Focusing

Fajri Abdillah clasense4

🎯
Focusing
View GitHub Profile
@clasense4
clasense4 / combine_md.sh
Created October 8, 2013 01:42
Simple Markdown combine
rm body.html
markdown index.md > body.html
cat head.html body.html tail.html > index.html
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@clasense4
clasense4 / head.html
Created October 8, 2013 02:03
Simple Head script for markdown, got css from here (https://gist.github.com/andyferra/2554919)
<html>
<head>
<title></title>
<style>
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
@clasense4
clasense4 / tail.html
Created October 8, 2013 02:08
Simple html tail file
</body>
</html>
@clasense4
clasense4 / Multi regex file
Created October 9, 2013 10:42
Simple Regex
phpName="UserID" => phpName.\"[a-z]*\"
@clasense4
clasense4 / scrapy
Created February 24, 2016 01:22
Scrapy Regex Unicode Error, got no solution for this
[root@cls rss_crawler]# scrapy crawl news
http://www.focus.de/sport/formel1/formel-1-idol-in-marburger-ausstellung-alles-dreht-sich-um-michael-schumacher-wie-es-ihm-geht-bleibt-ungewiss_id_5292575.html
2016-02-23 20:15:06 [scrapy] INFO: Scrapy 1.0.5 started (bot: rss_crawler)
2016-02-23 20:15:06 [scrapy] INFO: Optional features available: ssl, http11, boto
2016-02-23 20:15:06 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'rss_crawler.spiders', 'SPIDER_MODULES': ['rss_crawler.spiders'], 'BOT_NAME': 'rss_crawler'}
2016-02-23 20:15:06 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, LogStats, CoreStats, SpiderState
2016-02-23 20:15:06 [boto] DEBUG: Retrieving credentials from metadata server.
2016-02-23 20:15:06 [boto] ERROR: Caught exception reading instance data
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/boto/utils.py", line 210, in retry_url
@clasense4
clasense4 / monit
Last active April 28, 2016 11:59
Fresh Install monit from 0 Centos 6.5
#!/bin/bash
#
# Init file for Monit system monitor
# Written by Stewart Adam <s.adam@diffingo.com>
# based on script by Dag Wieers <dag@wieers.com>.
#
# chkconfig: - 98 02
# description: Utility for monitoring services on a Unix system
#
# processname: monit
@clasense4
clasense4 / command.sh
Created October 22, 2016 03:24
Fixing awk problem in OSX el capitan
brew unlink gawk
brew reinstall awk
awk
@clasense4
clasense4 / disable-xdebug.sh
Last active November 19, 2016 12:25 — forked from hacfi/disable-xdebug.sh
OS X homebrew php 7.0 enable/disable xdebug extension script
#!/bin/sh
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
echo "xdebug disabled"