Skip to content

Instantly share code, notes, and snippets.

View vovanx's full-sized avatar

Vladimir Khiruntsev vovanx

  • chopochom.com
  • Simferopol
View GitHub Profile
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach:
0.8+: Continue current approach
0.5-0.7: Consider minor adjustments
Below 0.5: Seriously consider backtracking and trying a different approach
@gdellicarpini
gdellicarpini / aliases_centos.md
Last active July 21, 2024 22:28
Add permanent aliases in Linux CentOS

Aliases for all users

  • Create a file in /etc/profile.d/ directory

      - myAlias.sh
    
  • Define the alias in the file

      alias gotoserver1="ssh [email protected]"
    
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 02:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mfyz
mfyz / resize_preview.html
Created April 8, 2014 21:49
HTML5 FileReader + canvas resizer to resize & preview before upload an image using jquery.
<!DOCTYPE html>
<html>
<head>
<title>Angular HTML5 Preview, Crop And Upload</title>
<style>
body {
padding: 50px;
font: 16px Helvetica;
}
@umidjons
umidjons / rowHtmlOptionsExpression.md
Created March 31, 2014 10:20
Yii: Add additional `data-` attributes to each row in `CGridView`

Add additional data- attributes to each row in CGridView

Sometimes we need to hold some values from model in data- attributes of tag. But we can't use $data special variable in cell's htmlOptions attributes. Instead of holding data in cell, we can generate data- attributes for rows (tr). For this purpose CGridView has special attribute rowHtmlOptionsExpression.

<?php
$this->widget( 'zii.widgets.grid.CGridView',
[
	'id'                       => 'my-grid',
	'dataProvider'             => $model->search(),
@walkergv
walkergv / php-UA.php
Last active May 20, 2022 09:04
Simple Event Tracking with Measurement Protocol Using cURL and PHP (plus redirect)
<?
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://www.google-analytics.com/collect?v=1&tid=[UA-XXXXXXXXX-1]&cid=[RANDOM_INTEGER_OR_GUID]&t=event&ec=[EVENT_CATEGORY]&ea=[EVENT_ACTION]&el=[EVENT_LABEL]',
CURLOPT_USERAGENT => 'Vanity-URL-Tracker',
));
$resp = curl_exec($curl);
curl_close($curl);
header("HTTP/1.1 301 Moved Permanently");