Skip to content

Instantly share code, notes, and snippets.

View attacomsian's full-sized avatar
🌱
Fore Studio

Atta ✨ attacomsian

🌱
Fore Studio
View GitHub Profile
@Sharabaddin
Sharabaddin / fastfix
Last active November 7, 2021 17:36
java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone
ERROR: java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
SOLVE:
1. sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
2. add after line [mysqld]
default_time_zone='+03:00'
3. ctrl+o
4. ctrl+x
5. sudo service mysql restart
@TomTasche
TomTasche / nginx.conf
Last active January 27, 2023 21:22
config for nginx to proxy a specific path to an S3 bucket
# copied from default config
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@AndreiCalazans
AndreiCalazans / airlines.json
Last active August 1, 2023 11:38
List of Airlines 2 letter code
{
"U2": "easyjet",
"1T": "Bulgarian Air Charter",
"Q5": "40-Mile Air",
"4O": "Interjet",
"7A": "Express Air Cargo",
"JY": "Air Turks and Caicos",
"JU": "Air Serbia",
"QH": "Kyrgyzstan",
"A8": "Benin Golf Air",
@colebemis
colebemis / feather-pipe.ts
Created December 5, 2017 21:30
Using Feather with Angular
import { DomSanitizer } from '@angular/platform-browser';
import { Pipe, PipeTransform } from '@angular/core';
import { icons } from 'feather-icons'; // v4+
@Pipe({ name: 'feather' })
export class FeatherIconsPipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {}
@SatyaSnehith
SatyaSnehith / Converter.java
Last active May 4, 2024 08:06
Convert Bytes to KB, MB, GB, TB - java
public class Converter{
static long kilo = 1024;
static long mega = kilo * kilo;
static long giga = mega * kilo;
static long tera = giga * kilo;
public static void main(String[] args) {
for (String arg: args) {
try {
System.out.println(getSize(Long.parseLong(arg)));
@pcgeek86
pcgeek86 / Car Manufacturers.json
Last active April 30, 2024 15:28
Plain-text list of major car manufacturers
[
"Abarth",
"Alfa Romeo",
"Aston Martin",
"Audi",
"Bentley",
"BMW",
"Bugatti",
"Cadillac",
"Chevrolet",
@031nna
031nna / laravel-notes.md
Last active November 16, 2020 09:11
Common laravel commands

##laravel

logging in laravel

tail -n0 -F storage/logs/laravel.log add use Log; above the class then use Log::info('check this var =' . $var);

install laravel composer create-project laravel/laravel laravelapp

@utek
utek / wildcard-ssl-certificate.md
Created August 31, 2018 06:25 — forked from talyguryn/wildcard-ssl-certificate.md
How to get a wildcard ssl certificate and set up Nginx.

Request a new certificate

Get certbot

Go to any directory and clone repo with sources.

cd ~
git clone https://github.com/certbot/certbot
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active May 22, 2024 08:34
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@abatko
abatko / US Zip Code Geolocations from 2018 Government Data
Last active April 26, 2024 00:48
All US zip codes with their corresponding geolocations (latitude and longitude coordinates). Comma delimited for your database goodness. Source: https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html > ZIP Code Tabulation Areas > Download the ZIP Code Tabulation Areas Gazetteer File
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158327, -66.932928
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.447538, -66.557681
00622,17.991245, -67.153993