Skip to content

Instantly share code, notes, and snippets.

Avatar
🐶

Adham EL-Deeb adham90

🐶
View GitHub Profile
View order_request_body.json
{
"order_id": "String",
"total_price": "String",
"seller_id": "String",
"notes": "String",
"order_items": [
{
"item_id": "String",
"unit_price": "String",
"quantity": "Number",
View token.json
{
"payload":{
"first_name":"String",
"last_name":"String",
"email":"String",
"phone":"String",
"address":[
{
"city_name":"String",
"state_name":"String",
@adham90
adham90 / abbreviations.vim
Last active Sep 27, 2019
My vim and nvim(neovim) configurations
View abbreviations.vim
iabbrev myid adham90
@adham90
adham90 / rewrite-commit
Created Jun 25, 2017
rewrite commit message by id
View rewrite-commit
git filter-branch -f --msg-filter '
if [ "$GIT_COMMIT" = "ddbe6b0d2561566aa91733c98cce086bdd50bdd5" ];
then
echo new message;
else
cat
fi' HEAD
@adham90
adham90 / 0_reuse_code.js
Created Jun 2, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@adham90
adham90 / archlinux_installation_guide.md
Last active Aug 12, 2016
Archlinux installation guide
View archlinux_installation_guide.md

#Arch Linux installation guide

  1. See what disk structure there is: $ lsblk
  2. Format boot partition: $ mkfs.ext4 /dev/sda<root> or use btrfs 😮
$ mkfs.btrfs -L "Arch" /dev/sda1
$ mount /dev/sda1 /mnt
@adham90
adham90 / authentication.rb
Created Jul 12, 2016 — forked from jnunemaker/authentication.rb
a starting point for authentication with mongomapper and rails
View authentication.rb
# include this in application controller
module Authentication
protected
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
end
# Returns true or false if the user is signed in.
@adham90
adham90 / spacemacs-keybindings
Last active Aug 3, 2020
spacemacs keybindings that i need to learn
View spacemacs-keybindings
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
View fill error
NoMethodError in MessagesController#create
undefined method `fetch' for nil:NilClass
Extracted source (around line #37):
#35 # Also makes sure proper dependencies are required.
#36 def pubsub_adapter
*37 adapter = (cable.fetch('adapter') { 'redis' })
#38 path_to_adapter = "action_cable/subscription_adapter/#{adapter}"
#39 begin
You can’t perform that action at this time.