Skip to content

Instantly share code, notes, and snippets.

View ssatz's full-sized avatar
🏠
Working from home

sathish ssatz

🏠
Working from home
View GitHub Profile
@ssatz
ssatz / docker-compose.yml
Created July 3, 2018 08:02
wordpress docker composer v3
wordpress:
image: wordpress:php7.2-fpm-alpine
restart: always
volumes:
- ./wordpress:/var/www/wordpress/
environment:
WORDPRESS_DB_PASSWORD: homestead
WORDPRESS_DB_USER : homestead
WORDPRESS_DB_NAME : homestead
WORDPRESS_DB_HOST : dbwordpress
@ssatz
ssatz / media-query.css
Created July 18, 2018 06:13 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@ssatz
ssatz / database.php
Created July 29, 2018 09:43
syntax error or access violation: 1055 isn't in group by laravel
<?php
/**
* *
* * Copyright (C) dataentrycareer.in- All Rights Reserved
* * * Unauthorized copying of this file, via any medium is strictly prohibited
* * * Proprietary and confidential
* * * Written by Sathish Kumar(satz) <[email protected]>
* *
*
*/
@ssatz
ssatz / resolve.txt
Created October 8, 2018 06:11
docker registry variable is not set .NET core on MAC OS
If you checkout the error. The file mount of macos is not configured for docker
https://docs.docker.com/docker-for-mac/osxfs/#namespaces
use the File sharing tab in Docker preferences whale
menu -> Preferences -> File sharing.
Add /usr/local/share/dotnet/sdk/NuGetFallbackFolder
@ssatz
ssatz / server-reponse.service.ts
Last active October 16, 2018 12:17
Angular Server Response
import { RESPONSE } from '@nguniversal/express-engine/tokens';
import { Inject, Injectable, Optional } from '@angular/core';
@Injectable()
export class ServerReponseService {
constructor(@Optional() @Inject(RESPONSE) private _response: any) {
}
public setStatus(code: number, message: string): void {
if (this._response) {
@ssatz
ssatz / reactnative
Last active November 3, 2018 14:04
React Native
http://localhost:8081/debugger-ui/
Enable Debug Js Remote
react-native start --reset-cache
//Enable live reload on real device, it will open devloper menu
adb shell input keyevent 82
@ssatz
ssatz / flutter
Created November 6, 2018 09:07
flutter
adb shell
mlv5:/ $ logcat -e listening
--------- beginning of crash
--------- beginning of system
--------- beginning of main
09-12 12:34:08.847 19381 19417 I flutter : Observatory listening on http://127.0.0.1:54554/
curl http://127.0.0.1:54554/
curl: (7) Failed to connect to 127.0.0.1 port 54554: Connection refused
@ssatz
ssatz / nginx
Created November 16, 2018 16:03
nginx config for enabling compression and browser caching
server {
listen 80 default_server;
listen [::]:80 default_server;
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
@ssatz
ssatz / sql_wp.sql
Created January 14, 2019 06:17
Wordpress Get POST With Terms(with Category)
SELECT * FROM wp_posts LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_term_taxonomy
ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
LEFT JOIN wp_terms
ON (wp_term_relationships.term_taxonomy_id = wp_terms.term_id)
WHERE wp_posts.post_type = 'post'
AND wp_term_taxonomy.taxonomy = 'category'
ORDER BY
post_date DESC;
@ssatz
ssatz / WP-Query
Created January 14, 2019 13:09 — forked from hoangitk/WP-Query
SQL Query to get Latest Wordpress Post with Featured Image.
select DISTINCT wp_posts.id, wp_posts.post_title, wp_posts.post_content, wp_posts.post_type, featured_image.guid as post_image, wp_posts.post_modified, wp_users.display_name
from wp_posts
inner join wp_postmeta on wp_posts.id = wp_postmeta.post_id and wp_postmeta.meta_key = '_thumbnail_id'
inner join wp_posts as featured_image on featured_image.id = wp_postmeta.meta_value
inner join wp_users on wp_users.id = wp_posts.post_author
where wp_posts.post_status = 'publish'
order by wp_posts.ID desc
limit 10