Skip to content

Instantly share code, notes, and snippets.

View phanirithvij's full-sized avatar
😶‍🌫️
When you are free please let me know

Phani Rithvij phanirithvij

😶‍🌫️
When you are free please let me know
  • 12:48 (UTC +05:30)
View GitHub Profile
@manveru
manveru / gears.go
Created May 24, 2010 13:06
Gears with SDL/OpenGL in Go
package main
import (
"sdl"
"gl"
"time"
. "math"
. "fmt"
)
@gourneau
gourneau / python-pil-image-sprite.py
Created April 24, 2011 02:45
Make sprites of images using Python and PIL
#!/usr/bin/python
# This work is licensed under the Creative Commons Attribution 3.0 United
# States License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by/3.0/us/ or send a letter to Creative
# Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
# from http://oranlooney.com/make-css-sprites-python-image-library/
# Orignial Author Oran Looney <olooney@gmail.com>
@slikts
slikts / gist:1159341
Created August 20, 2011 16:56
mangareader.net user CSS
#wrapper_header,
#adtop,
#topchapter,
#bottomchapter,
#adfooter,
#zoomer,
#wrapper_footer,
.zoomimg {
display: none;
}
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@jpillora
jpillora / smtp-gmail-send.go
Last active March 5, 2024 21:26
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang
package pool
type Task interface {
Execute(id int)
}
type Pool struct {
tasks chan Task
kill chan bool
}
@liulixiang1988
liulixiang1988 / app.py
Created August 14, 2015 03:02
upload multiple files in Flask
import os
# We'll render HTML templates and access data sent by POST
# using the request object from flask. Redirect and url_for
# will be used to redirect the user once the upload is done
# and send_from_directory will help us to send/show on the
# browser the file that the user just uploaded
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
# Initialize the Flask application
@qhwa
qhwa / go_port_forwarding.go
Last active March 27, 2024 13:17
network port forwarding in go lang
package main
import (
"fmt"
"io"
"net"
)
func main() {
ln, err := net.Listen("tcp", ":8080")
@haasn
haasn / image.lua
Last active March 11, 2024 06:57
mvi - set of configuration for turning mpv into an image viewer
-- Allow changing a property with by zoom-adjusted amount
function zoom_invariant_add(prop, amt)
amt = amt / 2 ^ mp.get_property_number("video-zoom")
mp.set_property_number(prop, mp.get_property_number(prop) + amt)
end
-- Resets the pan if the entire image would be visible
function zoom_check_center()
local zoom = mp.get_property_number("video-zoom")
local rot = mp.get_property_number("video-rotate") * math.pi / 180