Skip to content

Instantly share code, notes, and snippets.

View seyonv's full-sized avatar

Seyon Vas seyonv

  • Toronto, Ontario
View GitHub Profile
@seyonv
seyonv / fm_token_file.txt
Created May 24, 2020 03:33
File to store current login token for Focusmate
1590289120
randomstartingotokentext
@seyonv
seyonv / Focusmate_num_sessions_v1.rb
Last active January 19, 2022 15:08
File to get the current total number of sessions in Focusmate
require 'json'
require 'pry'
require 'uri'
require 'net/http'
class FocusMateNumSessions
# Step 1. Create a file somewhere in your filesystem.
# Call it fm_token_file.txt. Insert the path to the file into the line below
# Make sure to look at the reference .txt file and just paste
# that over.
@seyonv
seyonv / gist:c4da3729257235b80326a4f3c7d4f9d7
Created May 24, 2020 03:30
Focusmate_num_sessions_v1.rb
require 'json'
require 'pry'
require 'uri'
require 'net/http'
class FocusMateNumSessions
# Step 1. Create a file somewhere in your filesystem.
# Call it fm_token_file.txt. Insert the path to the file into the line below
# Make sure to look at the reference .txt file and just paste
# that over.
<iframe>
some text
</iframe>
class Tesseract < Formula
desc "OCR (Optical Character Recognition) engine"
homepage "https://github.com/tesseract-ocr/"
url "https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz"
sha256 "26cd39cb3f2a6f6f1bf4050d1cc0aae35edee49eb49a92df3cb7f9487caa013d"
revision 3
bottle do
revision 1
sha256 "19d4caa5ce632ca41d3b45accd7f116f6cf93688531f26437cb4833f26cc0172" => :yosemite
@seyonv
seyonv / ruby_stuck_process.txt
Last active April 18, 2017 19:03
Ruby Stuck Processes
Thread 5 (Thread 0x1803 of process 49463):
#0 0x00007fff94281cd2 in semaphore_wait_trap () from /usr/lib/system/libsystem_kernel.dylib
#1 0x000000010e1fd2c8 in ?? () from /Users/seyonvasantharajan/Desktop/whats_your_plan/vendor/ruby/2.3.0/gems/therubyracer-0.12.3/lib/v8/init.bundle
#2 0x000000010e0f5089 in ?? () from /Users/seyonvasantharajan/Desktop/whats_your_plan/vendor/ruby/2.3.0/gems/therubyracer-0.12.3/lib/v8/init.bundle
#3 0x000000010e1fd40f in ?? () from /Users/seyonvasantharajan/Desktop/whats_your_plan/vendor/ruby/2.3.0/gems/therubyracer-0.12.3/lib/v8/init.bundle
#4 0x000000010e1fcb8c in ?? () from /Users/seyonvasantharajan/Desktop/whats_your_plan/vendor/ruby/2.3.0/gems/therubyracer-0.12.3/lib/v8/init.bundle
#5 0x00007fff940a19b1 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#6 0x00007fff940a192e in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#7 0x00007fff9409f385 in thread_start () from /usr/lib/system/libsystem_pthread.dylib
/Users/seyonvasantharajan/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:656:in `method_missing'
/Users/seyonvasantharajan/Desktop/whats_your_plan/spec/features/full_goalsetting_spec.rb:165:in `block (3 levels) in <top (required)>'
/Users/seyonvasantharajan/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:363:in `module_exec'
/Users/seyonvasantharajan/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:363:in `subclass'
/Users/seyonvasantharajan/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:254:in `block in define_example_group_method'
/Users/seyonvasantharajan/Desktop/whats_your_plan/spec/features/full_goalsetting_spec.rb:149:in `block (2 levels) in <top (required)>'
/Users/seyonvasantharajan/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:363:in `module_exec'
@seyonv
seyonv / sed_file_extension_and_name.sh
Created July 29, 2016 20:56
Using sed to separate the name & extension parts of a string
FILE_NAME=$(echo "$IN_FILE" | sed 's/\([a-zA-Z0-9_]*\).[a-zA-Z0-9]*/\1/')
FILE_EXT=$(echo "$IN_FILE" | sed 's/[a-zA-Z0-9_]*\(.[a-zA-Z0-9]*\)/\1/')
#!/bin/bash
cd ~/Desktop/diversifyforyou
pushToStaging() {
git add .
git commit -m "$*"
git push
heroku run rake db:migrate --app stagingdfy
heroku apps:open --app stagingdfy
#!/bin/bash
cd ~/Desktop/diversifyforyou
pushToStaging() {
git add .
git commit -m "$*"
git push
heroku run rake db:migrate --app stagingdfy
heroku apps:open --app stagingdfy