Skip to content

Instantly share code, notes, and snippets.

View Krule's full-sized avatar
🍐
Fruity

Armin Pašalić Krule

🍐
Fruity
View GitHub Profile
@Krule
Krule / main.go
Created December 1, 2022 16:13
ChatGPT first attempt
// Event is a representation of a significant happening in the gang's history.
type Event struct {
Timestamp time.Time
Name string
Data map[string]interface{}
}
// EventLog is a record of all the significant happenings in the gang's history.
type EventLog []Event
@Krule
Krule / itexi.sublime-snippet
Created September 22, 2016 08:19
Rspec snippet: `it { is_expected.to include(...) }`
<snippet>
<content><![CDATA[it { is_expected.to include($0) }]]></content>
<tabTrigger>itexi</tabTrigger>
<scope>source.ruby</scope>
<description>it { is_expected.to include(...) }</description>
</snippet>
@Krule
Krule / itex.sublime-snippet
Last active September 22, 2016 08:18
Rspec it { is_expected.to }
<snippet>
<content><![CDATA[it { is_expected.to($0) }]]></content>
<tabTrigger>itex</tabTrigger>
<scope>source.ruby</scope>
<description>it { is_expected.to(...) }</description>
</snippet>
@Krule
Krule / tokens.json
Created January 19, 2016 13:23
Token result
{
"tokens": [
{
"token": " adaquaten",
"start_offset": 6,
"end_offset": 15,
"type": "shingle",
"position": 0
},
{
@Krule
Krule / cv-brief.tex
Created January 11, 2016 21:20
My brief CV
\documentclass[letterpaper]{article}
\usepackage{color,hyperref,geometry,subfigure,fancyhdr,sectsty,pstricks}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[sc,osf]{mathpazo}
\usepackage{adforn}
\usepackage{soul}
\geometry{ body={6.5in, 8.5in}, left=1.0in, top=1.20in }
This file has been truncated, but you can view the full file.
aachen
aachener
aachenerin
aachenern
aacheners
aachens
aadorf
aalbauer
aalbeck
aalbestand
@Krule
Krule / mysql_stored_functions.rb
Last active August 29, 2015 14:19
Stored functions for string escaping for CSV export
module MysqlStoredFunctions
def store_urlencode_function
sql = <<-_SQL
DROP FUNCTION IF EXISTS urlencode;
^
-- Thank Jeremy Thomerson for this one
-- http://jeremythomerson.com/2013/05/30/urlencoder-function-for-mysql/
CREATE FUNCTION URLENCODE(str VARCHAR(4096) CHARSET utf8) RETURNS VARCHAR(4096) CHARSET utf8
DETERMINISTIC
CONTAINS SQL

Keybase proof

I hereby claim:

  • I am krule on github.
  • I am krule (https://keybase.io/krule) on keybase.
  • I have a public key whose fingerprint is FBD5 ECFC 66E7 9973 7834 0828 83F1 2B32 0729 DFB8

To claim this, I am signing this object:

$fontawesome_path: "." !default
@font-face
font-family: 'FontAwesome'
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot')
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot?#iefix') format("embedded-opentype"), font-url('#{$fontawesome_path}/fontawesome-webfont.woff') format("woff"), font-url('#{$fontawesome_path}/fontawesome-webfont.ttf') format("truetype")
font-weight: normal
font-style: normal
@mixin icon($icon)
@Krule
Krule / base.rb
Last active August 29, 2015 14:08
Base template
# Base template
# Empty gemfile
run 'cat /dev/null > Gemfile'
# Build new one
add_source 'https://rubygems.org'
gem 'bcrypt', '~> 3.1.7'
gem 'coffee-rails', '~> 4.0.0'