Skip to content

Instantly share code, notes, and snippets.

View dynamicguy's full-sized avatar
🎯
Focusing

Nurul Ferdous dynamicguy

🎯
Focusing
View GitHub Profile
@kevinlu1248
kevinlu1248 / BaseIndex.tsx.md
Last active August 1, 2023 22:23
Langchain's Chunker
@duluca
duluca / awc-ecs-access-to-aws-efs.md
Last active December 9, 2023 11:36
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@dynamicguy
dynamicguy / recreate_all_ios_simulators.rb
Last active September 14, 2018 23:41
Recreate all available iOS simulators
#!/usr/bin/env ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer

@dynamicguy
dynamicguy / install-opencv-2.4.11-in-ubuntu.sh
Last active April 3, 2024 20:20
install opencv-2.4.11 in ubuntu
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@rxin
rxin / df.py
Last active January 26, 2017 00:44
DataFrame simple aggregation performance benchmark
data = sqlContext.load("/home/rxin/ints.parquet")
data.groupBy("a").agg(col("a"), avg("num")).collect()
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@dynamicguy
dynamicguy / Vagrantfile
Created February 26, 2012 19:12
Vagrant configuration
##################################
### Custom additions from Krux
##################################
### Extensive documentation here:
### http://vagrantup.com/docs/vagrantfile.html
require 'etc'
owner = ENV['KRUX_MY_USERNAME'] || Etc.getlogin
hosts = {
@mikeobrien
mikeobrien / app.coffee
Created February 21, 2012 04:49
Lazy loading backbone collection + infinite scrolling
class LazyCollection extends Backbone.Collection
indexQuerystring: 'index'
index: 1
lastLength: 0
fetch: (options) ->
options or= {}
if options.reset
@index = 1
@lastLength = 0
else
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.