Skip to content

Instantly share code, notes, and snippets.

@Greennut
Greennut / listunion.py
Created November 14, 2018 09:23
listunion
match_p = list(set(match_p2).union(set(match_p3)))
@Greennut
Greennut / textline.py
Last active November 13, 2018 08:06
string and list
>>> text = '''这是第一行
... 这是第二行
... 这是第三行
... 这是第四行
... 这是第五行
... 这是第六行
... '
...
... '''
>>> print(text)
@Greennut
Greennut / path.endswith
Created November 13, 2018 07:15
python path file extension
>>> path
'C:\\..\\..\\XXXXX.doc'
>>> path.endswith('.doc')
True
>>> path.endswith('.txt')
False
@Greennut
Greennut / evernote_clearly_two_column.css
Last active March 15, 2017 09:16
evernote_clearly_two_column_css
p:nth-child(4n) { -webkit-column-break-after: always;}
div.page_content {-webkit-column-count: 2;}
@Greennut
Greennut / evernote-clearly.css
Created March 15, 2017 01:49 — forked from Edditoria/evernote-clearly.css
My customized CSS theme for the Evernote Clearly browser extension
/**
* CSS theme for the Clearly browser extension by Evernote.
* See: www.evernote.com/clearly/
*
* Options used alongside this CSS:
* Body font: "Adelle", Georgia, 微軟正黑體, Helvetica, Arial, sans-serif
* Header font: Soho-condensed, PT Serif, 微軟正黑體, Helvetica
* Monospace font: 微軟正黑體Mono, Inconsolata, Consolas, Droid Sans Mono
* Background: #FFFFFF
* Foregound: #333333
@Greennut
Greennut / evernote-clearly.css
Created March 15, 2017 01:49 — forked from Edditoria/evernote-clearly.css
My customized CSS theme for the Evernote Clearly browser extension
/**
* CSS theme for the Clearly browser extension by Evernote.
* See: www.evernote.com/clearly/
*
* Options used alongside this CSS:
* Body font: "Adelle", Georgia, 微軟正黑體, Helvetica, Arial, sans-serif
* Header font: Soho-condensed, PT Serif, 微軟正黑體, Helvetica
* Monospace font: 微軟正黑體Mono, Inconsolata, Consolas, Droid Sans Mono
* Background: #FFFFFF
* Foregound: #333333
@Greennut
Greennut / evernote-clearly.css
Created March 15, 2017 01:49 — forked from Edditoria/evernote-clearly.css
My customized CSS theme for the Evernote Clearly browser extension
/**
* CSS theme for the Clearly browser extension by Evernote.
* See: www.evernote.com/clearly/
*
* Options used alongside this CSS:
* Body font: "Adelle", Georgia, 微軟正黑體, Helvetica, Arial, sans-serif
* Header font: Soho-condensed, PT Serif, 微軟正黑體, Helvetica
* Monospace font: 微軟正黑體Mono, Inconsolata, Consolas, Droid Sans Mono
* Background: #FFFFFF
* Foregound: #333333
@Greennut
Greennut / README.md
Created September 22, 2016 10:23 — forked from DariaAlekseeva/README.md
Resume

To see my resume in browser click here.

How do I complete this project?

  1. Go to the Javascript Basics course and select "View Course Materials."
  2. Go through the videos and assignments in this course to learn the JavaScript necessary to build your resume.
  3. Review your work against the Project Rubric (on the next page).
  4. When you are satisfied with your project, submit it according to the Submission Instructions on the next page.

By the end:

@Greennut
Greennut / facebook_crawler.py
Created September 22, 2016 10:21 — forked from wenzhengjiang/facebook_crawler.py
A Facebook post crawler
from bs4 import BeautifulSoup
from selenium import webdriver
import garble
import json, time, threading
class FacebookCrawler:
""" A crawler for extracting facebook posts
"""
def __init__(self, name, url, options = {}):
self.name = name
@Greennut
Greennut / facebook-get-more-results
Last active September 22, 2016 10:05 — forked from d-georgiev-91/facebook-get-more-results
Facebook get more results
var totalResultsCount = 0;
function getMoreResultsElement() {
var anchors = document.getElementsByClassName("pam uiBoxLightblue uiMorePagerPrimary");
for(var i in anchors) {
if(anchors[i].innerText == "See More") {
var element = anchors[i];
return element;
}