Skip to content

Instantly share code, notes, and snippets.

@todun
todun / web-servers.md
Created March 4, 2020 23:31 — forked from willurd/web-servers.md
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
@todun
todun / README.md
Created October 2, 2019 17:13 — forked from roachhd/README.md
Games on GitHub

Games on GitHub

Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.

Contributing

If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.

Help: MarkDown Help, Markdown Cheatsheet

@todun
todun / linux_fun.md
Created August 3, 2019 08:20 — forked from zlorb/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc
@todun
todun / howto-put-git-repo-into-another-repo.md
Created August 2, 2019 11:58 — forked from Restuta/howto-put-git-repo-into-another-repo.md
How to make git repo to be another's repo subfolder preserving history

Hacky way (let me know if you know better one)

Let's say you have repo Main and repo Proto, you want to put your Proto under Main, so folder structure will be the following:

|-SRC
   |---proto

and you also want to preserve commit history, so everybody can see what you were doing while developing proto, sounds like pretty easy task. The easiest way is to create folder structure similar to Main repo SRC\proto and start working using is as a root, but if you like me, you didn't think about this beforehand, so you path would be harder:

const { setContext } = require('apollo-link-context');
const { HttpLink } = require('apollo-link-http');
const { introspectSchema, makeRemoteExecutableSchema } = require('graphql-tools');
const fetch = require('node-fetch');
module.exports = function(api) {
api.createSchema(async function(graphql) {
const http = new HttpLink({
uri: 'http://example.com/api',
fetch
@ServerlessBot
ServerlessBot / IAMCredentials.json
Last active February 24, 2025 15:51
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@afrokick
afrokick / [Ubuntu] Install nginx + letsencrypt
Last active March 13, 2019 15:00
It is a list of commands for install nginx + Letsencrypt
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
sudo apt-get install -y nginx && sudo apt-get install -y software-properties-common && sudo apt-get install -y python-certbot-nginx
sudo certbot --nginx
@afrokick
afrokick / nginx-meteor-default
Created September 5, 2018 17:24
nginx configuration for meteor proxy
upstream meteor {
hash $remote_addr;
server app1.example.com:3000 max_fails=2 fail_timeout=5s;
server app2.example.com:3000 max_fails=2 fail_timeout=5s;
}
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
@todun
todun / rename_branch_name.sh
Created August 7, 2018 14:13 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@todun
todun / osx-ffmpeg-install.sh
Last active August 1, 2018 19:55 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew
# Installation
brew install ffmpeg $(brew options ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ')
# to convert Mp4 to WebM
## ffmpeg -i video.mp4 video.webm
## ffmpeg -i input.mkv -vn audio_only.ogg
## ffmpeg -i input.mkv output.gif # make gif out of a video
# Reference