Skip to content

Instantly share code, notes, and snippets.

View oze4's full-sized avatar
♠️
👋

Matt Oestreich oze4

♠️
👋
View GitHub Profile
@oze4
oze4 / LogFile.cs
Last active September 1, 2018 04:55
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using DnsUpdater.ExtensionsMethods;
namespace DnsUpdater
{
@oze4
oze4 / mongo_classes.py
Created September 14, 2018 01:35
python_mongo_with_classes
from pymongo import MongoClient
# THE NEW CLASS
class CtMongoConnectionSettings(object):
# This constructor gives the person using this class
# the option to connect to a server, db, and coll all at once
def __init__(self, mongo_server, mongo_port, mongo_database, mongo_collection):
self.mongo_server = mongo_server
self.mongo_database = mongo_database
const gulp = require('gulp');
const sass = require('gulp-sass');
const cssImport = require('gulp-cssimport');
const cssBase64 = require('gulp-css-base64');
const concat = require('gulp-concat');
const task = gulp.task;
const src = gulp.src;
const dest = gulp.dest;
class Person:
# this is a private class attr
__private_class_attr = "I am a private class attr"
# this is a class wide attribute ***********************************
public_class_wide_attribute = 0
# this is what allows you to instantiate objects - aka construct them
# which is why its called a constructor
using System;
public class Program
{
public static void Main()
{
var currentCount = Person.GetCounter;
Console.WriteLine(string.Format("Current Person Count: {0}", currentCount));
var matt = new Person("matt", "lizzy", "pizzy");
@oze4
oze4 / html.html
Last active January 31, 2019 22:11
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Geo map public IP addresses">
<meta name="author" content="Matt Oestreich">
<meta name="og:image" content="../docs/ostrike_logo.png">
@oze4
oze4 / v-cloak.css
Created February 9, 2019 23:55
v-cloak for vue.js loading
[v-cloak] {
display: block;
padding: 50px 0;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" sizes="16x16" href="">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Chucky Norris</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" sizes="16x16" href="">
@oze4
oze4 / cookies.js
Last active December 10, 2021 22:45
export default class Cookies {
static get(name) {
if (document.cookie.length === 0) {
return null;
}
const start = document.cookie.indexOf(`${name}=`);
if (start == -1) {
return null;
}
const end = document.cookie.indexOf(";", start);