Skip to content

Instantly share code, notes, and snippets.


Oğulcan Girginç ogirginc

View GitHub Profile
View controllers.application\.js
import Controller from '@ember/controller';
import { isEmpty } from '@ember/utils';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
xxx = isEmpty(undefined) ? 1 : 2;
ogirginc / tripmode.zsh
Created Oct 12, 2021
Display TripMode on Bartender 4, when network name matches.
View tripmode.zsh
network_SSID="$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -e "s/^ *SSID: //p" -e d)"
phone_name="Ogulcan's Phone"
if [ $network_SSID = phone_name ]; then
echo true
echo false
ogirginc / ember-projections.json
Created May 6, 2021 — forked from AndrewRadev/ember-projections.json
A `.projections.json` file that can be used with vim-projectionist for navigating ember.js projects
View ember-projections.json
"app/initializers/*.js": {
"type": "initializer"
"app/models/*.js": {
"type": "model",
"alternate": "app/adapters/{}.js",
"app/adapters/*.js": {
"type": "adapter",
ogirginc /
Created Mar 4, 2021 — forked from manigandham/
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

  • ProseMirror - - supports collaborative editing, offers similar options to Mobiledoc for data structure
View given_when_then.rb
module GivenWhenThen
module ClassMethods
def def_Given(name, *args, &block)
_gwt_define(:Given, name, *args, &block)
def def_When(name, *args, &block)
_gwt_define(:When, name, *args, &block)
View example.rb
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source ""
git_source(:github) { |repo| "{repo}.git" }
# Activate the gem you are reporting the issue against.
ogirginc /
Created Apr 25, 2019 — forked from rwjblue/
Run rspec only on uncommited files. No more accidentally pushing a :focus tag to master!
rspec `git ls-files --modified --others spec`

I originally wrote this article for Codementor in October 2014. It should have something for everyone, from fairly new git users to experienced developers.

1. Discard local file modifications

Sometimes the best way to get a feel for a problem is diving in and playing around with the code. Unfortunately, the changes made in the process sometimes turn out to be less than optimal, in which case reverting the file to its original state can be the fastest and easiest solution:

git checkout -- Gemfile # reset specified path 
git checkout -- lib bin # also works with multiple arguments
View Speeding up zsh &