Skip to content

Instantly share code, notes, and snippets.

View gyurisc's full-sized avatar
🏠
Working from home

gyurisc gyurisc

🏠
Working from home
View GitHub Profile
# Add the alias below to ~/.bash_profile on a Mac
# Save the file and run: source ~/.bash_profile
# ASP.NET and Visual Studio Code on OS X
source dnvm.sh
export MONO_MANAGED_WATCHER=disabled
alias code='open $@ -a "Visual Studio Code"'
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProtoBuf;
namespace TestProtoBufSerialization
@gyurisc
gyurisc / flat-colors.css
Created November 28, 2013 09:57
Flat UI Color and Background Color style definitions: -turquoise -green-sea -emerald -nephritis -petermann-river -belize-hole -amethyst -wisteria -wet-asphalt -midnight-blue -sun-flower -orange -carrot -pumpkin -alizarin -pomegranate -clouds -silver -concerte -asbestos
/* Flat Colors */
/* Greens */
.color-turquoise
{
color: turquoise;
}
.color-green-sea
{
@gyurisc
gyurisc / github.js
Created April 19, 2018 07:41
Simple React.js example
// to run this use: https://jscomplete.com/repl
import React from 'react';
import { render } from 'react-dom';
const Card = (props) => {
return (
<div style={{margin: '1em'}}>
<img width="75" src={props.avatar_url} />
<div style={{display: 'inline-block', marginLeft: 10}}>
<div style={{fontSize: '1.25em', fontWieght: 'bold'}}>
@gyurisc
gyurisc / PDFExtractor.cs
Last active July 26, 2020 20:12
Extracting attachments from a PDF file and write it out to a file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp.text.pdf;
namespace PDFExtract
{
public class PDFExtractor
{
@gyurisc
gyurisc / FeedChecker.py
Created May 2, 2023 05:52
Feed parser gist script that runs on every 5 mins
import feedparser
import time
def parse_feed(feed_url):
rss_feed = feedparser.parse(feed_url)
return rss_feed
def get_latest_entries(rss_feed, last_updated):
new_entries = []
@gyurisc
gyurisc / detect_barcode.py
Created November 20, 2015 10:47
Detecting Barcodes in Images with Python and OpenCV
# Detecting Barcodes in Images with Python and OpenCV
# OpenCV 3.0
# http://www.pyimagesearch.com/2014/11/24/detecting-barcodes-images-python-opencv/
import numpy as np
import argparse
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i","--image", required = True, help="path to image file")
You're a senior developer specialized in SQL. Your job is to go through my db schema, and create comments for table defintion, so that the next developer knows what the SQL code is doing.
Write your comments in the following style:
```sql
-- The blog table stores information about blogs.
-- id: The unique identifier for the blog.
-- title: The title of the blog. It is a non-null field.
-- description: The description of the blog, which can be a large text. It is nullable.
-- created_at: The timestamp of when the blog was created. It has a default value of the current timestamp.