Skip to content

Instantly share code, notes, and snippets.

@milisarge
milisarge / gist:9fd9045bda7533bb5aef7c9c1a273fd4
Last active June 25, 2016 06:23
ricin-cli commands template
ricin-cli addfriend 516A72B673D4E7123C6C8430078549AC717F221C49E2D80C9F48AB64170A5B4546F0FD60D000
ricin-cli deletefriend friend-num
ricin-cli sendmessage friend-num "hello"
ricin-cli sendfile friend-num file
ricin-cli changestatus status-number
@milisarge
milisarge / git_server.py
Last active April 21, 2017 01:03
ipv6 dulwich git sunucu-git server
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
from dulwich.repo import Repo
from dulwich.server import DictBackend, TCPGitServer
import threading
import socket
import os
TCPGitServer.address_family = socket.AF_INET6
aktaran=b"Milisarge <[email protected]>"
import httpclient, asyncdispatch, strutils, tables, unicode, json, math, times
const
ForecastUrlFormat = "http://api.openweathermap.org/data/2.5/forecast/daily?APPID=$1&lang=en&q=$2&cnt=$3"
ResultFormat = """$1:
$2
Temperature: $3 °C
Humidity: $4%
Clouds: $5%
@milisarge
milisarge / systray.vala
Created September 8, 2017 14:24
Systray example in vala
using Gtk;
public class Main {
class AppStatusIcon : Window {
private StatusIcon trayicon;
private Gtk.Menu menuSystem;
private AboutDialog aboutDialog;
public AppStatusIcon() {
/* Create tray icon */
@milisarge
milisarge / canvas-production-deploy.md
Last active December 1, 2021 12:37
Canvas-LMS Kurulum Notları

İşletim Sistemi bilgileri

Ubuntu 20.04.2 LTS

Veritabanı kurulması ve ayarları

sudo apt-get install postgresql
# db şifre set edilecek
sudo -u postgres createuser canvas --no-createdb --no-superuser --no-createrole --pwprompt
@milisarge
milisarge / ayguci-cli.py
Created December 1, 2021 10:34
Ayguci sudo ile erişim
import subprocess
import pam
sifre="1234567"
kullanici="myuser"
p=pam.pam()
durum=p.authenticate(kullanici,sifre)
@milisarge
milisarge / pam.py
Created December 1, 2021 10:35
One file python pam module
# (c) 2007 Chris AtLee <[email protected]>
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
#
# Original author: Chris AtLee
#
# Modified by David Ford, 2011-12-6
# added py3 support and encoding
# added pam_end
# added pam_setcred to reset credentials after seeing Leon Walker's remarks
@milisarge
milisarge / canvas-production-deploy-debian.md
Last active April 13, 2022 07:54
Canvas-LMS Kurulum Notlar

İşletim Sistemi bilgileri

Debian Bullseye LXC

Ön-gerekler

apt install wget git lxc file
# file komutu Canvas koşuğunda gereklidir.
@milisarge
milisarge / lxc-static-ip.config
Last active December 4, 2021 10:37
LXC static ip config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: -d alpine -r edge -a amd64
# Template script checksum (SHA-1): 985e49018f4037a7854e89877ba09c4fe6c57af5
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Uncomment to create unprivileged containers
@milisarge
milisarge / linq.lua
Created December 8, 2021 13:56
Language Integrated Query impl in Lua
--
-- linq.lua
--
-- Copyright (c) 2020 Mathew Mariani
--
-- 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