Skip to content

Instantly share code, notes, and snippets.

View Suvink's full-sized avatar
🏢
Working from office

Suvin Nimnaka Suvink

🏢
Working from office
View GitHub Profile
@Suvink
Suvink / youtube-vimeo-url-parser.js
Created November 23, 2018 18:38 — forked from yangshun/youtube-vimeo-url-parser.js
YouTube Vimeo URL Parser
function parseVideo (url) {
// - Supported YouTube URL formats:
// - http://www.youtube.com/watch?v=My2FRPA3Gf8
// - http://youtu.be/My2FRPA3Gf8
// - https://youtube.googleapis.com/v/My2FRPA3Gf8
// - Supported Vimeo URL formats:
// - http://vimeo.com/25451551
// - http://player.vimeo.com/video/25451551
// - Also supports relative URLs:
// - //player.vimeo.com/video/25451551
@Suvink
Suvink / deploy.php
Created August 22, 2019 05:34 — forked from riodw/deploy.php
Deploy to Production Server with git using PHP
<?php
/**
* GIT DEPLOYMENT SCRIPT
*
* Used for automatically deploying websites via github or bitbucket, more deets here:
* https://gist.github.com/riodw/71f6e2244534deae652962b32b7454e2
* How To Use:
* https://medium.com/riow/deploy-to-production-server-with-git-using-php-ab69b13f78ad
*/
// The commands
@Suvink
Suvink / helloThere.png
Last active October 22, 2023 06:08
Hi There! This is me...
helloThere.png
@Suvink
Suvink / projects.gif
Last active November 30, 2021 15:08
So these are my recent projects!
projects.gif
🦠 Stats for 2022-12-06 08:46:40
🌎 Global Cases: 249461042 💀 Global Deaths: 5047622
🇱🇰 Local Cases: 671711 🇱🇰 Local Hospitalized: 0
🌎 Global Recovery: ██████████████████░░ 90%
🇱🇰 Local Recovery: ███████████████████▍ 97%
@Suvink
Suvink / SecureAPI.md
Last active April 14, 2020 19:45
SecureAPI

SecureAPI

SecureAPI is a simple Firebase Cloud Function that relays insecure http APIs into secured https APIs. This comes in handy when some API providers charge you for https APIs. :wink

How to use

@Suvink
Suvink / drawing.py
Created May 28, 2020 12:07
Drawing objects with Python and OpenGL.
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
def myInit():
glClearColor(1.0, 1.0, 0.0, 1.0)
glColor3f(0.2, 0.5, 0.4)
glPointSize(10.0)
gluOrtho2D(0, 500, 0, 500)
@Suvink
Suvink / drawing.c
Created May 28, 2020 12:43
This is the way of implementing the following tutorial in C. (https://services.suvink.me/opengl-c)
#include<stdio.h>
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
void myInit (void){
glClearColor(1.0, 1.0, 0.0, 1.0);
glColor3f(0.2, 0.5, 0.4);
glPointSize(10.0);
gluOrtho2D(0, 500, 0, 500);
}
@Suvink
Suvink / MyMathClass.java
Created May 31, 2020 13:05
Java Generics
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.lang.Number;
public class MyMathClass<T, V extends Number> {
public double Average (HashMap<T, V> hashmp){
double count = 0;
double sum = 0;

Keybase proof

I hereby claim:

  • I am suvink on github.
  • I am suvink (https://keybase.io/suvink) on keybase.
  • I have a public key ASDsYLySGfqQFtS2U5egWwxypFOUmh0JN2qvZN4FaHxv_Qo

To claim this, I am signing this object: