Skip to content

Instantly share code, notes, and snippets.

Avatar

Jennifer Konikowski jmkoni

View GitHub Profile
View VariableCaseFixer.php
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
{
$predefinedVariables = [
'$GLOBALS',
'$_SERVER',
'$_GET',
'$_POST',
'$_FILES',
'$_REQUEST',
'$_SESSION',
View rainbow-settings.json
"bracket-pair-colorizer-2.colors": [
"DeepSkyBlue",
"DodgerBlue",
"MediumSlateBlue",
"BlueViolet",
"MediumVioletRed",
"DeepPink",
"Red",
"DarkOrange",
"Gold",
View export_slack_emojis.rb
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)
View keybase.md

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 Sep 21, 2018
sinatra-jira main file
View sinatra_jira.rb
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 Sep 21, 2018
sinatra-jira response
View response.erb
<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 Sep 21, 2018
sinatra-jira form
View form.erb
<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 Sep 21, 2018
sinatra-jira Gemfile
View Gemfile
source 'https://rubygems.org'
gem 'dotenv'
gem 'rubocop'
gem 'sinatra'
gem 'thin'
View english_number.rb
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
View MyServletTests.scala
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], "/*")
You can’t perform that action at this time.