Skip to content

Instantly share code, notes, and snippets.

View jmkoni's full-sized avatar
💻

Jennifer Konikowski jmkoni

💻
View GitHub Profile
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
{
$predefinedVariables = [
'$GLOBALS',
'$_SERVER',
'$_GET',
'$_POST',
'$_FILES',
'$_REQUEST',
'$_SESSION',
"bracket-pair-colorizer-2.colors": [
"DeepSkyBlue",
"DodgerBlue",
"MediumSlateBlue",
"BlueViolet",
"MediumVioletRed",
"DeepPink",
"Red",
"DarkOrange",
"Gold",
require 'json'
require 'open-uri'
Dir.mkdir('emojis') unless Dir.exist?('emojis')
number = Integer(ARGV[0]) || 10
# assuming you have numbered the files correctly, loops through each
(1..number).each do |i|
file = File.open("emoji#{i}.json")
data = JSON.load(file)

Keybase proof

I hereby claim:

  • I am jmkoni on github.
  • I am jmkoni (https://keybase.io/jmkoni) on keybase.
  • I have a public key ASC7YyWVLtDxJqLSPh9kkoRmSIjl2iLh-YV1uFLEQyCdwQo

To claim this, I am signing this object:

@jmkoni
jmkoni / sinatra_jira.rb
Created September 21, 2018 14:50
sinatra-jira main file
require 'sinatra'
require 'net/http'
require 'uri'
require 'json'
get '/' do
erb :form
end
# TODO: select box for issue type
@jmkoni
jmkoni / response.erb
Created September 21, 2018 14:50
sinatra-jira response
<h2>Thank you for helping us be better!</h2>
<!-- add more text that includes anything you want as follow up from the user -->
@jmkoni
jmkoni / form.erb
Created September 21, 2018 14:49
sinatra-jira form
<h2>Submit a bug to JIRA!</h2>
<form action="/form" method="post">
<p>Name: <br>
<small>Name of bug submitter</small>
<br>
<input type="text" name="name">
</p>
<p>Descriptive Title: <br>
<small>Example: Got error page when trying to view a page</small>
<br>
@jmkoni
jmkoni / Gemfile
Last active September 21, 2018 14:50
sinatra-jira Gemfile
source 'https://rubygems.org'
gem 'dotenv'
gem 'rubocop'
gem 'sinatra'
gem 'thin'
class NumberPrinter
ONES = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
TEENS = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
TENS = ["ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]
TRANSLATION = { hundred: 100, thousand: 1000, million: 1000000, billion: 1000000000}
attr_accessor :number
def initialize(number)
@number = number
import org.eclipse.jetty.http.HttpStatus
import org.scalatra.test.scalatest.ScalatraFunSuite
import pdi.jwt.{Jwt, JwtAlgorithm, JwtClaim}
import java.net.HttpCookie
class MyServletTests extends ScalatraFunSuite {
addServlet(classOf[MyServlet], "/*")