Skip to content

Instantly share code, notes, and snippets.

View uzbekdev1's full-sized avatar
🌴
On vacation

Elyor Latipov uzbekdev1

🌴
On vacation
View GitHub Profile
@RiFi2k
RiFi2k / nginx.conf.j2
Last active April 7, 2021 22:50
Trellis nginx.conf file to include setting the real IP from Cloudflare if you use their DNS and SSL certs - https://github.com/roots/trellis/blob/master/roles/nginx/templates/nginx.conf.j2
# {{ ansible_managed }}
# nginx Configuration File
# http://wiki.nginx.org/Configuration
# Run as a less privileged user for security reasons.
user {{ nginx_user }};
# How many worker threads to run;
# "auto" sets it to the number of CPU cores available in the system, and
@udif
udif / consoles.md
Last active April 18, 2023 09:53
CMD.exe replacements for Windows

http://mintty.github.io/ - Mintty is a terminal emulator for Cygwin, MSYS and Msys2.
https://sourceforge.net/projects/poderosa/ - A terminal emulator with tabbed user interface and various connectivity including Telnet, SSH1/2, and cygwin.
http://www.softwareok.com/?seite=Freeware/ColorConsole - ColorConsole brings a little color to your black and white world of Windows console (cmd.exe).
https://conemu.github.io/ - ConEmu-Maximus5 is a Windows console emulator with tabs, which presents multiple consoles and simple GUI applications as one customizable GUI window with various features.
http://www.powercmd.com/ - PowerCmd: A Better Command Prompt Replacement Tool.
http://cmder.net/ - Portable console emulator for windows.
https://sourceforge.net/projects/console/ - Console is a Windows console window enhancement.
https://jpsoft.com/tccle-cmd-replacement.html - TCC/LE Windows CMD Replacement Shell : Upgrade Your CMD Commands.
http://www.gammadyne.com/cmdline.htm#gs - GS.EXE is an alternative DOS

@JonCatmull
JonCatmull / file-size.pipe.ts
Last active April 14, 2024 14:27
Angular2 + TypeScript file size Pipe/Filter. Convert bytes into largest possible unit. e.g. 1024 => 1 KB
/**
* @license
* Copyright (c) 2019 Jonathan Catmull.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@tomysmile
tomysmile / mac-setup-redis.md
Last active April 11, 2025 18:01
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@ihadeed
ihadeed / dropdown.ts
Created July 10, 2016 03:15
Angular2 Component: Semantic UI Dropdown
import {Component, ElementRef, AfterViewInit, Output, EventEmitter, Input, Self} from '@angular/core';
import {ControlValueAccessor, NgModel} from '@angular/common';
declare var $: any;
@Component({
selector: 'dropdown',
template: `
<select class="ui dropdown" [(ngModel)]="selectedOption">
<option value="">Select one</option>
<option *ngFor="let item of items" [value]="item[valueField]">{{item[textField]}}</option>
</select>
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active April 17, 2025 04:04 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@rhmoult
rhmoult / ProcessArmor.cs
Created May 23, 2016 19:46
Process Armor - Prevent users from killing your service or process
using System;
using System.Diagnostics;
using System.Reflection;
using System.ComponentModel;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Runtime.InteropServices;
using System.Configuration.Install;
@stereokai
stereokai / gist:36dc0095b9d24ce93b045e2ddc60d7a0
Last active January 6, 2025 16:03
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
@noahub
noahub / count_up.js
Last active March 14, 2024 06:54
Count Up Animation
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
$('.counter').each(function() {
var $this = $(this),
countTo = $this.attr('data-count');
$({ countNum: $this.text()}).animate({
countNum: countTo
@theorigin
theorigin / SQLServer-APIPost.sql
Last active March 15, 2025 03:16
SQL Server code to POST to an API
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"what": 1,
"ever": "you",
"need": "to send as the body"
}'
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;