Skip to content

Instantly share code, notes, and snippets.

View itskenny0's full-sized avatar

kenny itskenny0

  • I don't know what I'm doing, Inc.
  • Germany
View GitHub Profile
@Kylmakalle
Kylmakalle / main.py
Created August 6, 2017 19:10 — forked from gurland/main.py
How to delete all your messages from chat in telegram? Easy, just use this program
from telethon import TelegramClient
from telethon.errors import SessionPasswordNeededError
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.functions.channels import DeleteMessagesRequest
from telethon.tl.types.channel import Channel
import shelve
from os import listdir
from time import sleep
# Просто утилиты
@bgloh
bgloh / ble_scan_example.py
Created June 8, 2017 04:14
ble scan example using bluepy, bluez, and raspberry pi
from bluepy.btle import Scanner, DefaultDelegate
class ScanDelegate(DefaultDelegate):
def __init__(self):
DefaultDelegate.__init__(self)
def handleDiscovery(self, dev, isNewDev, isNewData):
if isNewDev:
print "Discovered device", dev.addr
elif isNewData:
const got = require('got');
const querystring = require('querystring');
const Promise = require('bluebird');
let url = [
"https://newsapi.org/v1/articles?source=cnn&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
"https://newsapi.org/v1/articles?source=abc-news-au&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
"https://newsapi.org/v1/articles?source=associated-press&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
"https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
"https://newsapi.org/v1/articles?source=bloomberg&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
"https://newsapi.org/v1/articles?source=business-insider&sortBy=top&apiKey=9f3b3102ab704b7c9a874ee92cdb288f",
@hbokh
hbokh / SaltShaker_install_en.md
Last active July 13, 2019 11:39
Install SaltShaker on Ubuntu 16.04.1 LTS

This is a "best-effort" in translating the "install.txt" from SaltShaker into English.
I tried all steps myself on a recent Ubuntu-host and latest SaltStack-packages.


This installation note applies to SaltShaker v2.1.3.

SaltShaker on Ubuntu 16.04.1 LTS

NOTE All commands are to be run as user "root".

for f in /usr/share/figlet/*
do
fs=$(basename $f)
fname=${fs%%.tlf}
toilet -f $fname $fname
done
@Manouchehri
Manouchehri / windows10qemu.sh
Last active February 10, 2022 18:50
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
# Installing
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom
# Running
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc
@cameronjacobson
cameronjacobson / octave_interface.php
Created March 19, 2014 02:30
Programmatic access to GNU Octave
<?php
$octave_command = "octave --no-window-system -q";
$spec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("file", "/tmp/octave_stderr.txt", "a")
);