Skip to content

Instantly share code, notes, and snippets.

View pixelomo's full-sized avatar
🏠
Working from home

Pixelomo pixelomo

🏠
Working from home
View GitHub Profile
import math
from moviepy.editor import concatenate, ImageClip
import os
import platform
import subprocess
import random
import torch
# pip install pytorch-pretrained-biggan
from pytorch_pretrained_biggan import (BigGAN, truncated_noise_sample, convert_to_images)
import numpy as np
@karltaylor
karltaylor / social-network-metadeta.pug
Last active February 8, 2022 03:04
Meta data for Facebook OpenGraph and Twitter cards in .pug format.
//- Facebook Open Graph Meta Data
meta(property="og:url" content="")
meta(property="og:type" content="")
meta(property="og:title" content="")
meta(property="og:description" content="")
meta(property="og:image" content="")
//- Twitter Meta Data
meta(name="twitter:card" content="summary_large_image")
meta(name="twitter:site" content="")
@peterdalle
peterdalle / robots.txt
Created December 3, 2016 15:18
Robots.txt that makes sure Facebook and Twitter can crawl images on your site.
# Disallow everything.
User-agent: *
Disallow: /
# Certain social media sites are whitelisted to allow crawlers to access page markup when links to /images are shared.
User-agent: Twitterbot
Allow: /images
User-agent: facebookexternalhit
Allow: /images
@xem
xem / readme.md
Last active July 14, 2024 10:15
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;