Skip to content

Instantly share code, notes, and snippets.

View morontt's full-sized avatar
🤖
Just for Fun

Alexander Kharchenko morontt

🤖
Just for Fun
View GitHub Profile
@lispm
lispm / basicinterpreter.lisp
Last active January 19, 2022 13:03
Basic Interpreter, sectorlisp example translated to Common Lisp
; source https://github.com/woodrush/sectorlisp-examples/blob/main/lisp/basic.lisp
; Common Lisp translation: [email protected], 2022
; https://gist.github.com/lispm/a2f56a1a6dc5599a039eb7134d99cd4a
(defun basic-example ()
(BASICINTERPRETER
(QUOTE (
(10 REM FIND AND PRINT PRIME NUMBERS BELOW N_MAX. )
(20 LET N_MAX = (1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) )
(30 LET I = (1 1) )
@JBlond
JBlond / bash-colors.md
Last active November 18, 2024 09:30 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
<?php
function get_tls_version($sslversion = null)
{
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
if ($sslversion !== null) {
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion);
}
@icqparty
icqparty / README.md
Last active October 31, 2017 14:11 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Отладка PHP-приложение c Xdebug в Docker-контейнере через редактор Intellij/PHPStorm

  1. Создайте в локальной дирриктори вашего проекта файл сборки Dockerfile со следующим содержанием:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&amp;&amp; echo "xdebug.remote_enable=on" &gt;&gt; /usr/local/etc/php/conf.d/xdebug.ini \
@tom--
tom-- / Random bytes, ints, UUIDs in PHP.md
Last active November 4, 2024 19:12
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
@apolloclark
apolloclark / postgres cheatsheet.md
Last active November 15, 2024 05:23
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@jamesrr39
jamesrr39 / Golang program stdin stdout interaction.md
Last active July 12, 2023 18:21
Using stdout and stdin from other programs in Golang

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@georgepsarakis
georgepsarakis / python-to-clojure-guide.clj
Last active August 29, 2015 14:20
Python small recipes translated to their Clojure equivalents
;; Regular Expressions
;; import re; re.search(r'ab.*', 'cabbage').group(0) # -> 'abbage'
(re-find #"ab.*" "cabbage") ; "abbage"
;; re.match(r'ab.*', 'cabbage') # -> None
(re-matches #"ab.*" "cabbage") ; nil
;; re.match(r'ab.*', 'abracatabra').group(0) # -> 'abracatabra'
(re-matches #"ab.*" "abracatabra") ; "abracatabra"
;; Sequences & Map/Filter
@a-vasyliev
a-vasyliev / example.com.conf
Created March 25, 2015 11:42
Nginx: proxy cache without utm_* parameters (remove query parameter, remove utm tags nginx)
server {
listen 443;
server_name example.com;
error_log /var/log/nginx/example_com_error.log warn;
ssl on;
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains
ssl_certificate_key /etc/nginx/ssl/your.key; #private key
@makmanalp
makmanalp / comparison.md
Last active June 10, 2024 14:24
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).