Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sardap's full-sized avatar

sardap

View GitHub Profile
@sardap
sardap / opengl.cpp
Created March 17, 2020 04:48
Open window openGL
#include <iostream>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
glViewport(0, 0, width, height);
}
int main()
# Semi colons ;
Don't use them or always use them.
Example:
```
# Good
name = gets.chomp
puts("hi #{name}")
# Also good
https://www.gremlin.com/community/tutorials/how-to-create-a-kubernetes-cluster-on-ubuntu-16-04-with-kubeadm-and-weave-net/
sudo su root
// Change root
apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@sardap
sardap / Sharing.sol
Last active May 13, 2018 12:05
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
//"asdb", ["10", "10"], "0x14723a09acff6d2a60dcdf7aa4aff308fddc160c"
//"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"
contract ExampleContract {
struct ShareEntry
{
address sharedAddress;
// 0 = No respone, 1 = Appoved, 2 = Rejected
int state;
@sardap
sardap / Sharing.sol
Created May 10, 2018 14:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=true&gist=
pragma solidity ^0.4.11;
contract ExampleContract {
struct ShareEntry
{
address sharedAddress;
// 0 = No respone, 1 = Appoved, 2 = Rejected
@sardap
sardap / IsEven.cs
Last active October 30, 2017 20:09
public interface IEven
{
};
public interface IOdd
{
};
public abstract class EvenOrOddNumber
{