Skip to content

Instantly share code, notes, and snippets.

View lalamax3d's full-sized avatar

Haseeb Ahmed lalamax3d

View GitHub Profile
@linuxdevhub
linuxdevhub / ThingsToDonstallingUbuntu.sh
Created January 2, 2020 16:44
Things To Do After Installing Ubuntu 18.04 LTS Desktop
#!/bin/sh
# This command will update & upgrade your system
sudo apt update && sudo apt-get upgrade --fix-missing
# Install the package build-essential for making the package and checkinstall for putting it into your package manager
sudo apt install build-essential checkinstall
# Install Ubuntu Restricted Extras
sudo apt install ubuntu-restricted-extras
# Youtube: https://youtu.be/1Eowk4PI2Rg
sudo apt-get update
sudo apt-get upgrade
# Install the official MongoDB
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
# Configure Node.js to be installed via package manager
@howiemnet
howiemnet / Particle resizer.vex.cpp
Last active July 11, 2022 18:04
Houdini Particle distance resizer
// NOTE: ignore the .cpp extension on the filename - this is VEX
// but I couldn't find a gist-friendly way to syntax-hilight it
// ¯\_(ツ)_/¯
//
// h's magic adaptive point resizer for optimal
// rendering of tiny points/particles/wires
//
// 1/2/2018 h@howiem.net
// CC-0 - use and abuse
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active December 5, 2023 10:26
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@mozillazg
mozillazg / app.py
Created December 5, 2017 00:06
A simple demo for how to use flask-paginate.
from flask import Flask, render_template
from flask_paginate import Pagination, get_page_args
app = Flask(__name__)
app.template_folder = ''
users = list(range(100))
def get_users(offset=0, per_page=10):
@dmahugh
dmahugh / comparision.py
Created May 23, 2017 17:21
comparison of asynchronous HTTP requests (aiohttp/asyncio) and traditional sequential requests (with Requests library)
"""Comparison of fetching web pages sequentially vs. asynchronously
Requirements: Python 3.5+, Requests, aiohttp, cchardet
For a walkthrough see this blog post:
http://mahugh.com/2017/05/23/http-requests-asyncio-aiohttp-vs-requests/
"""
import asyncio
from timeit import default_timer
@hiwonjoon
hiwonjoon / python-ffmpeg.py
Last active November 26, 2023 16:11
ffmpeg and ffprobe subprocess call in python; extract specific frame at some timepoint, extract duration of a video
import subprocess
import datetime
import numpy as np
THREAD_NUM=4
def get_video_info(fileloc) :
command = ['ffprobe',
'-v', 'fatal',
'-show_entries', 'stream=width,height,r_frame_rate,duration',
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 5, 2024 16:18
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@wckdouglas
wckdouglas / chromeos_setup.md
Last active January 13, 2019 18:02
setting up chromebook for developer

Computing environment setup guide for chromebooks

Douglas Wu


This is a note for myself to setup a developer environment on chromebook without using crouton (Running Linux GUI on chromeOS). I chose chromebrew since it is just a CLI interface and doesn't require running anything on top of any apps. And I am also a fan of miniconda, which works well on the linux kernal of ChromeOS.

  1. Get into developer mode, go to terminal and enter shell.

  2. Install chromebrew:

@sbrl
sbrl / renderer.js
Last active January 30, 2018 22:57
An ES6 template for a HTML5 canvas experiment. #template #html5-canvas
"use strict";
/**
* @template https://gist.github.com/sbrl/f8b584a383116b38da29
*/
class Renderer
{
constructor(canvas)
{
this.canvas = canvas;