Skip to content

Instantly share code, notes, and snippets.

View waawal's full-sized avatar

Daniel Waardal waawal

View GitHub Profile
@aseemk
aseemk / coffeescript-updates.md
Last active December 2, 2017 20:22
CoffeeScript upcoming changes.

CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.

Parentheses-free chaining

jashkenas/coffeescript#3263

Years of being wished for, finally granted!

@gregvish
gregvish / chat.py
Last active February 8, 2025 00:02
Python 3.4 asyncio chat server example
from socket import socket, SO_REUSEADDR, SOL_SOCKET
from asyncio import Task, coroutine, get_event_loop
class Peer(object):
def __init__(self, server, sock, name):
self.loop = server.loop
self.name = name
self._sock = sock
self._server = server
Task(self._peer_handler())
@leommoore
leommoore / Express_Logging.md
Last active November 14, 2024 05:46
Express - Logging

#Express - Logging The express.js node.js web application framework comes with a built-in logging module called logger which is the connect.js logger. It is really handy to enable and you can use it just like any other Express module. app.use(express.logger());

Without any configuration, the logger middleware will generate a detailed log using what is called the default format. The logger actually supports four predefined log formats: default, short ,tiny, and dev. Each of these predefined formats show various amounts of detail. You can specify one of them this way:

app.use(express.logger('dev'));

If you prefer, you can customize the precise details to be logged using the the following options to format the output of the logger:

@rxaviers
rxaviers / gist:7360908
Last active May 18, 2025 06:30
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@chhantyal
chhantyal / IPython_commands.py
Last active April 17, 2016 09:02
Most useful IPython commands
# Tab completion
a<Tab> # first car and hit tab
# Instropection
a = 'Foo says hello'
a? # shows info about variable, docstrings if it is function/class
aa?? # shows source code
# Unix Commands
!git # normal git command inside Ipython. Most of the Unix commands can be used this way
@konklone
konklone / ssl.rules
Last active October 29, 2024 07:36
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email [email protected].
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@missinglink
missinglink / installation.md
Last active December 20, 2015 03:19
Working example of how to set up elasticsearch so that the _percolate index is being populated via a mongodb river. Tested with mongodb 2.4.4+, elasticsearch 0.9.0+, elasticsearch-river-mongodb 1.6.11

Configure mongo for replication

  • Make sure you have sufficient disk space to hold the oplog ( can be several GB )
  • Edit /etc/mongodb.conf to add replSet = rs0
  • Restart mongodb
  • In the mongo REPL execute rs.initiate() ( this can take some time; log shows activity )
  • Try executing a query, your REPL prompt should now be rs0:PRIMARY>

MongoDB documentation: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@willurd
willurd / web-servers.md
Last active May 16, 2025 23:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000