Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

miron miron

🏠
Working from home
View GitHub Profile
@eslachance
eslachance / index_v11.js
Last active Sep 23, 2020
Simple, complete example of a bot in Discord.js
View index_v11.js
// Load up the discord.js library
const Discord = require("discord.js");
/*
DISCORD.JS VERSION 11 CODE
*/
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
@ywangd
ywangd / psiclient.py
Last active Apr 10, 2020
Proof-of-Concept Client for Pythonista-Script-Index
View psiclient.py
"""
Basic client for Pythonista Script Index (https://github.com/ywangd/Pythonista-Script-Index)
See also: https://github.com/ywangd/psiclient
"""
import platform
import sys
import os
import urllib2
import json
View custom.js
// add this to <profile>/static/custom/custom.js to load vim keybindings:
$.getScript("/static/components/codemirror/keymap/vim.js", function() {
if (! IPython.Cell) return;
IPython.Cell.options_default.cm_config.keyMap = "vim";
});
anonymous
anonymous / Pypi.py
Created Mar 26, 2013
Pypi
View Pypi.py
import urllib
import tarfile
import shutil
import console
import os
class Installer(object):
name = None
version = None
firstLetter = None
@silverkors
silverkors / fileman.py
Created Nov 27, 2012
Useful filemanager for Pythonista, move files, delete and create files and directories
View fileman.py
# -*- coding: utf-8 -*-
import os, sys, editor, shutil
from glob import glob
from scene import *
from time import time
from copy import deepcopy
from PIL import Image, ImageDraw, ImageFont
# https://gists.github.com/4034526
@pudquick
pudquick / shellista.py
Last active Sep 25, 2019
Advanced shell for Pythonista
View shellista.py
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# Credits
#
# The python code here was written by pudquick@github
#
# License
#
# This code is released under a standard MIT license.
#
@pudquick
pudquick / pipista.py
Created Nov 20, 2012
pipista - pip module (for installing other modules) for Pythonista
View pipista.py
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):
View ImageMail.py
# Example for sending an email with an attached image using smtplib
#
# IMPORTANT: You need to enter your email login in the main() function.
# The example is prepared for GMail, but other providers
# should be possible by changing the mail server.
import smtplib
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email import encoders
@omz
omz / FileTransfer.py
Last active Jun 21, 2020
File Transfer script for Pythonista (iOS)
View FileTransfer.py
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
You can’t perform that action at this time.