Skip to content

Instantly share code, notes, and snippets.

View misha-tgshv's full-sized avatar
🏠
Working from home

Misha Tugushev misha-tgshv

🏠
Working from home
View GitHub Profile
@sithart
sithart / send_file.py
Last active June 14, 2024 13:44
Upload file via pysftp with python
import pysftp as sftp
connection_info = {
'server': "SERVER NAME OR IP ADDRESS",
'user': "USER NAME",
'passwd': "PASSWORD",
}
def push_file_to_server():
s = sftp.Connection(host=connection_info['server'], username=connection_info['user'], password=connection_info['passwd'])
local_path = "LOCAL FILE PATH"
@mopsicus
mopsicus / turbo_aegea.php
Last active July 7, 2021 23:30
Generate RSS channel file Yandex turbo for Aegea blogengine
<?
$db_user = ''; // db user name
$db_password = ''; // db pass
$db_database = ''; // db name
$db_host = 'localhost'; // db url
$db = new mysqli($db_host, $db_user, $db_password, $db_database);
$result = $db->query("SELECT * FROM `notes` WHERE IsPublished = 1 AND isvisible = 1 ORDER BY `Stamp` DESC LIMIT 1");
@ad
ad / BTT.json
Last active April 1, 2018 16:05
BetterTouchTool
{
"BTTPresetName" : "Default",
"BTTPresetUUID" : "4DA9BBE8-9392-4B6C-A22B-AAF8189CE7C1",
"BTTPresetContent" : [
{
"BTTAppBundleIdentifier" : "BT.G",
"BTTAppName" : "Global",
"BTTAppSpecificSettings" : {
},
@podkovyrin
podkovyrin / podkovyr_btt.json
Last active January 29, 2020 13:50 — forked from vas3k/vas3k_btt_v2.json
BetterTouchTool Preset
{
"BTTPresetName" : "podkovyr-btt-preset",
"BTTPresetUUID" : "4DA9BBE8-9392-4B6C-A22B-AAF8189CE7C1",
"BTTPresetContent" : [
{
"BTTAppBundleIdentifier" : "BT.G",
"BTTAppName" : "Global",
"BTTAppSpecificSettings" : {
},
<?php
function translit($str, $val = 'en') {
$translit = array(
'а' => 'a', 'б' => 'b', 'в' => 'v',
'г' => 'g', 'д' => 'd', 'е' => 'e',
'ё' => 'yo', 'ж' => 'zh', 'з' => 'z',

Эта инструкция собрана по крупицам анонов и призвана помочь всем тем, кто не знает как скачивать личные документы из вк. Часто возникает один вопрос:

Можно ли скачивать личные документы конкретного пользователя вк?

Да, можно и нужно. Читай подробнее инструкцию и поймешь как это сделать.

Поиск документов

  1. Заходим на vk.com/docs
@putnamhill
putnamhill / hdiutil-attach-detach.sh
Last active January 25, 2024 22:16
Steps to attach a dmg disk image using hdiutil while capturing the mount point and dev entry for detaching when done
#!/bin/bash
dmg_path="$1"
# use process redirection to capture the mount point and dev entry
IFS=$'\n' read -rd '\n' mount_point dev_entry < <(
# mount the diskimage (leave out -readonly if making changes to the file system)
hdiutil attach -readonly -plist "$dmg_path" | \
@keg
keg / python_url_checker.py
Created November 10, 2016 23:09
Python redirect checker
#!/usr/bin/python
import csv
import requests
csv_data_to_write = [['original url', 'destination url',
'final http status', 'redirect path']]
def redirect_history(history):
'''repack urls to a neat list'''
@kingluddite
kingluddite / Default (OSX).sublime-keymap
Created August 18, 2016 19:24
mac key bindings sublime text 3
[
// enter command mode in Vintage
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
@betahikaru
betahikaru / redmine-https-aws.md
Last active September 6, 2020 04:03
Setup Bitnami Redmine on AWS & certbot(Let's Encrypt)

[WIP]Setup Bitnami Redmine on AWS & certbot(Let's Encrypt)

Note: Created at 2016/08/07

Todos

  • Automation refresh by cron

References

  • Let's Encrypt