Skip to content

Instantly share code, notes, and snippets.

View abbood's full-sized avatar
💭
Leading Village.do tech team

Abdullah Bakhach abbood

💭
Leading Village.do tech team
View GitHub Profile
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: Release
## Remote Plugins
- OK: Up to date
@abbood
abbood / gist:e15f77f0657b466ae69690cba36ba058
Created December 1, 2020 13:18
psql db migration error
ERROR: schema "pganalyze" already exists
CREATE EXTENSION
ERROR: must be owner of extension pg_stat_statements
CREATE EXTENSION
ERROR: must be owner of extension postgis
CREATE EXTENSION
ERROR: must be owner of extension uuid-ossp
ERROR: type "addbandarg" already exists
ERROR: must be owner of type public.addbandarg
ERROR: type "agg_count" already exists
@abbood
abbood / vimrc
Created November 28, 2020 13:29
vimrc
syntax enable
set background=dark
set encoding=UTF-8
let g:spacegray_low_contrast = 1
colorscheme spacegray
" colorscheme hybrid_material
syntax enable
set background=dark
set encoding=UTF-8
let g:spacegray_low_contrast = 1
colorscheme spacegray
" colorscheme hybrid_material
@abbood
abbood / gist:80940e73b7df4e4373949458107fa521
Created October 13, 2020 08:10
find top SO users by location and language
select
distinct u.id as [User ID],
u.displayname as [User Name],
u.reputation as [User Rep]
from users u
join badges b
on u.id = b.userid
where upper(u.location) like upper('%' + ##YourLocation:string## + '%') -- uppercase location--
and UPPER(b.name) LIKE UPPER('%' + ##Tag:string## + '%')
@abbood
abbood / gist:12bdccf20ec2392ab67f9559d559b207
Created October 13, 2020 07:52
getting top lebanon ios devs from stackoverflow query builder
reference: https://42hire.com/how-to-find-developers-at-stackoverflow-aa0f64dcffd1
DECLARE @myUsers TABLE
(
Id int,
Reputation int,
CreationDate datetime,
DisplayName nvarchar(40),
LastAccessDate datetime,
WebsiteUrl nvarchar(200),
[items_info] => Wilgucki\Csv\CsvCollection Object
(
[items:protected] => Array
(
[0] => App\StoreItem Object
(
[dates:protected] => Array
(
[0] => deleted_at
[1] => unavailable_until
--recurse=yes
--exclude=.git
--exclude=vendor/*
--exclude=node_modules/*
--exclude=db/*
--exclude=log/*
--exclude="*/_*cache/*"
--exclude="*/_*logs{0,1}/*"
--exclude="*/_*data/*"
--fields=+laimS
syntax enable
set background=dark
set encoding=UTF-8
let g:spacegray_low_contrast = 1
colorscheme Spacegray
" colorscheme hybrid_material
syntax enable
set background=dark
let g:spacegray_low_contrast = 1
colorscheme Spacegray
" colorscheme hybrid_material
" https://stackoverflow.com/a/1764336/766570