Skip to content

Instantly share code, notes, and snippets.

@skfarhat
skfarhat / VSCode Internal Commands
Created May 19, 2020 21:22
List of VSCode commands
--------------------------------------------
Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:33:47.663Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.5.0
-------------------------------------------
@skfarhat
skfarhat / sublime-react.md
Last active October 10, 2018 13:09
SublimeText 3 setup for ReactJs development

Global installs

npm install -g eslint
npm install -g esformatter 

Sublime installs

Open SublimeText Command + Shift + P (or whatever you use to open the command palette)

@skfarhat
skfarhat / EthBnB.sol
Last active June 27, 2018 07:15
WIP: AirBnB implementation in Ethereum
pragma solidity ^0.4.22;
contract EthBnB {
struct Room {
/**
* NOTE: we'll likely want to use another form of identifier for rooms
*/
uint roomId;
uint price;
@skfarhat
skfarhat / build.gradle
Created June 26, 2018 19:01
Sample build.gradle used in a Cucumber based test project
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
plugins {
id "com.github.samueltbrown.cucumber" version "0.9"
}

Packages to install:

  • gnome-tweak-tool
  • dconf-editor
  • gconf-editor

Change Alt-tab to default: gnome-tweak-tool --> AlternateTab

group:dat
category = {
cid:number, name:string, parent:number
1, 'anything', NULL
2, 'entertainment', 1
3, 'games', 2
4, 'health', 1
5, 'sports', 4
6, 'football', 5
#!/bin/bash
# lint.sh
# This script is meant to sit alongside cpplint.py
#TODO(sami): add 'option' do same for all, so that lint doesn't keep asking
# for each file when you've already said no for the first one
#TODO(sami): add another mode to this script, one is commit-mode the other is
# normal mode, useful for when the user wants to check the linting of the script
# outside of commit environment
#!/bin/bash
# pre-commit.sh
#
# NOTE:
# Typically placed in scripts/ directory in the root of a CMake project
# the expected directory structure
#
# Expects lint.sh in the same directory
#
# ├── project_root
@skfarhat
skfarhat / Useful git-merge commands
Last active April 12, 2016 10:53
Useful git commands
# add all renames to staged area in one command
git status | grep renamed | awk '{ print $4 }' | xargs -L1 git add
# list the branches that are merged
$ git branch --merged
# list the branches that are yet to be merged
$ git branch --no-merge
# delete merged branch