Skip to content

Instantly share code, notes, and snippets.

View moaazsidat's full-sized avatar
👋

Moaaz Sidat moaazsidat

👋
View GitHub Profile
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@simurai
simurai / README.md
Last active November 28, 2019 05:39
Atom for minimalists

For minimalist ❤️ ers

minimalist

Just you, your code and nothing else.... :meditatingbuddha:

@stowball
stowball / pre-commit
Last active May 3, 2018 05:58
Pre-commit hook to lint and flow check files to be committed
#!/bin/sh
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$")
if [ "$files" == "" ]; then
exit 0
fi
flow=$(npm run flow) # Change this to your flow script in package.json
eslint=$PWD/node_modules/.bin/eslint
@brennanMKE
brennanMKE / PARSESERVER.md
Last active September 21, 2017 00:03
Installing Parse Server on Heroku

Parse Server Installation on Heroku

Creating a new Heroku app using Parse Server can be done with a simple button which automates most of the work. A button using the current page on the GitHub repository to control the installation process. The steps below will install Parse Server as an app on Heroku using a MongoDB instance.

  1. Create an account on Heroku
  2. Verify the Heroku account by adding a credit card (It will not be charged anything on the free tier.)
  3. Open the Parse Server page in your web browser
  4. Click the Install on Heroku buttton
  5. Follow the instructions to create a new Heroku app
@Elements-
Elements- / getMP4Length.js
Created March 26, 2016 18:32
Read the duration of a mp4 file nodejs
var buff = new Buffer(100);
fs.open(file, 'r', function(err, fd) {
fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) {
var start = buffer.indexOf(new Buffer('mvhd')) + 17;
var timeScale = buffer.readUInt32BE(start, 4);
var duration = buffer.readUInt32BE(start + 4, 4);
var movieLength = Math.floor(duration/timeScale);
console.log('time scale: ' + timeScale);
console.log('duration: ' + duration);
@adamkaplan
adamkaplan / Uncached DNS, new connection
Last active January 16, 2023 03:34
Use Curl to identify bottlenecks in your service layers.
# SSL request to hostname that is not in DNS
> curl -o /dev/null -w @curlformat https://beta.finance.yahoo.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 255k 0 255k 0 0 233k 0 --:--:-- 0:00:01 --:--:-- 233k
Size: 261255
DNS: 0.522
Connect: 0.536
Here are a few questions that will tee us up for a good conversation:
- Can you tell me about your project in a few sentences?
- What’s the timeframe? Does a certain event depend on this project launching?
- What are you looking for from us? Do you want us to design, build, and launch the whole site? Or do you have developers or other partners lined up and only need us for design?
- Have you already started on any part of the project? Do you have existing work? A new logo? Some rough designs or ideas for the site?
- How large is your team? What are the roles you envision on your end?
- How did you hear about our work? What specifically interests you about it? Any projects that you’re keen on?
- How much money have you set aside for this project?
- Are you talking to others about this project? Might we ask how many? What do you like about their work?
@kidpixo
kidpixo / jupyter_shortcuts.md
Last active July 1, 2024 05:40
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.

Toc

Keyboard shortcuts

@calebd
calebd / ArrayHelpers.swift
Last active November 4, 2022 15:17
Swift Helpers
extension Array {
func first() -> Element? {
if isEmpty {
return nil
}
return self[0]
}
func last() -> Element? {
@mmerickel
mmerickel / settings.py
Created December 10, 2013 22:25
How to load a more useful ini file for use with pyramid.
from ConfigParser import RawConfigParser
def load_settings(global_config, app_settings):
"""
Load an INI file with multiple sections into a single dictionary.
.. code-block:: ini
[sqlalchemy]
url = sqlite://%(here)s