Skip to content

Instantly share code, notes, and snippets.

HazElement hazelement

Block or report user

Report or block hazelement

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .gitignore
# Created by https://www.gitignore.io
# Jetbrains
.idea
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
View docker-compose.yml
# docker compose with persistent data in database and php
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
View pipeline.groovy
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '3'))
}
agent any
stages {
stage('Cloning Git'){
steps {
// check out git repo and pull submodules recursively
View websocket.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName myserver.com
ProxyPreserveHost On
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8000/$1 [P,L]
View Docker setup notes
## Steps to install docker on brand new machine
1. Install docker and docker-compose
* `apt-get install docker docker-compose`
* `yum install docker docker-compose`
2. Add certain user to docker group, `usermod -aG docker $USER`
3. Direct docker to save cache to a specific location, modify `daemon.json` following the `daemon.json` notes.
4. If SElinux is enabled, issue this command to allow docker to access sepecified location `chcon -R -t svirt_sandbox_file_t /SOURCEDIR`
View executable-CMakeLists.txt
cmake_minimum_required(VERSION 2.8.9)
project (TestLibrary)
#For the shared library:
set ( PROJECT_LINK_LIBS libtestStudent.so )
link_directories( ~/exploringBB/extras/cmake/studentlib_shared/build )
#For the static library:
#set ( PROJECT_LINK_LIBS libtestStudent.a )
#link_directories( ~/exploringBB/extras/cmake/studentlib_static/build )
@hazelement
hazelement / launch.json
Last active Jan 15, 2019
VSCode setting for C/C++ Project
View launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "debug",
"type": "cppdbg",
"request": "launch",
View site.conf
http {
server {
// redirect all to 443
listen 80 default server;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate www.example.com.crt;
@hazelement
hazelement / .tmux.conf
Last active Oct 26, 2018
machine_config
View .tmux.conf
# Uncomment the lines with the options you want to activate (by deleting the preceding "#")
# Allow mouse interaction
# set-option -g mouse on
# set prefix key
# set -g prefix M-space
# set -g prefix M
# unbind C-b
# bind-key M send-prefix
@hazelement
hazelement / cryptokitties.sol
Created Oct 24, 2018 — forked from arpit/cryptokitties.sol
Cryptokitties Contract from the Eth blockchain
View cryptokitties.sol
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
You can’t perform that action at this time.