Skip to content

Instantly share code, notes, and snippets.

@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tpai
tpai / instructions.md
Last active September 22, 2022 11:20
use both Tor and Privoxy with Mac OSX

1. install

brew install tor
brew install privoxy

2. copy and modify config file

@jenslohmann
jenslohmann / toString Generator
Last active June 20, 2022 08:53
Java toString() generator for IntelliJ IDEA that generates JSON
public java.lang.String toString() {
#if ( $members.size() > 0 )
#set ( $i = 0 )
return "{\"_class\":\"$classname\", " +
#foreach( $member in $members )
#set ( $i = $i + 1 )
#if ( $i == $members.size() )
#set ( $postfix = "+" )
#else
#set ( $postfix = "+ "", "" + " )
@staltz
staltz / introrx.md
Last active July 25, 2024 13:33
The introduction to Reactive Programming you've been missing
@madaboutcode
madaboutcode / callhistory.sql
Created June 14, 2014 17:17
Call history, ios, iphone, query
select datetime(date, 'unixepoch') as dd,address,duration/60,id,
case (flags>>15)&1 when 1 then '1' else '0' end || case (flags>>14)&1 when 1 then '1' else '0' end || case (flags>>13)&1 when 1 then '1' else '0' end || case (flags>>12)&1 when 1 then '1' else '0' end || case (flags>>11)&1 when 1 then '1' else '0' end || case (flags>>10)&1 when 1 then '1' else '0' end || case (flags>>9)&1 when 1 then '1' else '0' end || case (flags>>8)&1 when 1 then '1' else '0' end || case (flags>>7)&1 when 1 then '1' else '0' end || case (flags>>6)&1 when 1 then '1' else '0' end || case (flags>>5)&1 when 1 then '1' else '0' end || case (flags>>4)&1 when 1 then '1' else '0' end || case (flags>>3)&1 when 1 then '1' else '0' end || case (flags>>2)&1 when 1 then '1' else '0' end || case (flags>>1)&1 when 1 then '1' else '0' end || case (flags>>0)&1 when 1 then '1' else '0' end flagbin
, flags, answered from call where duration > 0 and face_time_data IS NULL order by dd desc;
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@warpech
warpech / jQuery.md
Last active May 22, 2024 14:24
Web Components from the perspective of a jQuery developer

Web Components as successor to jQuery

This article is a homage to jQuery - a library that once was a great boost for the productiveness of thousands of web developers around the world. In the upcoming times, the benefit of using it will drop as web developers start to switch to the web standards, including Web Components.

Status quo

As of early 2014, current state of interactive web development heavily relies on established web standards - HTML, CSS and JavaScript, all of which have been subject to consistent iterative improvement during the last few years, with the support of all major web browser vendors.

As a report shows, 57.8% of all websites use JavaScript, of which stunning 93.2% use the jQuery library to enhance the development (source). There is a long tail of other libraries and micro frameworks that are being used instead, or in compliment to jQuery, but none of them has gotten close to the popularity of t

@emiller42
emiller42 / ghost
Created October 28, 2013 04:44
init.d script to run Ghost under a service account.
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/ghost/ghost/index.js
#
. /etc/rc.d/init.d/functions
USER="ghost"
@st4lk
st4lk / root_logger_settings.py
Last active May 2, 2024 15:25
Python logging settings for root logger
"""
Settings for root logger.
Log messages will be printed to console and also to log file (rotated, with
specified size). All log messages from used libraries will be also handled.
Three approaches for defining logging settings are used:
1. using logging classes directly (py25+, py30+)
2. using fileConfig (py26+, py30+)
3. using dictConfig (py27+, py32+)
Choose any variant as you like, but keep in mind python versions, that
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.