Skip to content

Instantly share code, notes, and snippets.

View sbrin's full-sized avatar

Mikhail Ilin sbrin

View GitHub Profile
@sbrin
sbrin / default.md
Created June 23, 2025 15:57 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
function maxLength(a, k) {
let result = 0;
for (let i = 0; i < a.length; i++) {
let arr = [];
if (a[i] <= k) {
let arraySum = 0;
for (let j = i; j < a.length; j++) {
if (arraySum + a[j] <= k) {
arraySum += a[j];
arr.push(a[j]);
#!/usr/bin/env sh
# остановить публикацию при ошибках
set -e
# сборка
npm run build
# переход в каталог сборки
cd dist
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<style>
@sbrin
sbrin / popover_simple.js
Last active October 25, 2016 19:59
jQuery simple popover hides on click anywhere beside itself
$(function () {
var pop = {};
pop.shown = false;
pop.item = $('.popover');
$('body').on('click', function(e){
if ( e.target.className == 'button-block' ){
if ( pop.shown == true ){
pop.item.hide();
pop.shown = false;
@sbrin
sbrin / rsync.sh
Last active February 15, 2016 12:07
rsync -av --ignore-existing --exclude-from '[excludefile]' [srcpath] [dstpath]
@sbrin
sbrin / saveLog.php
Created November 24, 2014 16:28
simple php logging
function saveLog( $data )
{
$logname = date("Ymd") . ".log.txt";
$handle = fopen($logname, "a+");
if ($handle !== false) {
fwrite($handle, $data . PHP_EOL);
fclose($handle);
} else {
throw new Exception("saveLog fopen error");
@sbrin
sbrin / index.html
Last active February 10, 2023 22:23
Paste MS Word Text Jquery plugin
<!DOCTYPE html>
<html>
<body>
<div id="src">Source here...</div>
<div id="editor" contenteditable="true">
<p>Place MS-Word text here...</p>
</div>
</body>
</html>
@sbrin
sbrin / gist:6605987
Created September 18, 2013 07:55
bash FOR loop variables to skip spaces
OIFS="$IFS"
IFS=$'\n'
@sbrin
sbrin / gist:5927664
Last active December 19, 2015 08:39
Wget sitemap spider
wget --spider -o wget.log -e robots=off --wait 3 -r -p -S http://
grep -ri 'http://' wget.log | grep -E -v '(files/|\.jpg|\.jpeg|\.gif|\.css|\.js|\.pdf|\.png|\.xls)' | awk '{print $3}'|sort|uniq|sort > site_map.txt
cat $1 |grep -i -E -v '(\.jpg|\.jpeg|\.gif|\.css|\.js|\.pdf|\.png|\.xls|\.ico|\.txt|\.doc|yandexbot|googlebot|YandexDirect|\/upload\/|" 404 |" 301 |" 302 )'|perl -MURI::Escape -lne 'print uri_unescape($_)'|grep yandsearch|awk '{print $1}'|sort|uniq|wc -l