Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hiorws on github.
  • I am hiorws (https://keybase.io/hiorws) on keybase.
  • I have a public key ASBLG2nYwtJx3dOKG8eb6T11pq0-Tr2S3Qy-XN6YRdu_Wwo

To claim this, I am signing this object:

@hiorws
hiorws / app.py
Created March 18, 2017 15:54 — forked from vgoklani/app.py
Using Flask to output Python data to High Charts
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350):
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,}
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}]
title = {"text": 'My Title'}
@hiorws
hiorws / installation.md
Created January 3, 2018 14:01 — forked from guillaumevincent/installation.md
A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1
@hiorws
hiorws / tweet_dumper.py
Created May 12, 2018 15:29 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""

Build a scalable Twitter clone with Django and GetStream.io

In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.

We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.

I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.

@hiorws
hiorws / migrateserver.sh
Created October 22, 2018 07:53 — forked from larvel/migrateserver.sh
Script to copy production server to test server
#!/bin/bash
USER=user
MYSQLPASSWORD=password
MYSQL="/usr/bin/mysql"
MYSQLDUMP="mysqldump --max_allowed_packet=800M"
TESTSERVER=mynewserver.mydomain.com
FOLDER=/usr/local/atlassian/
EXCLUDE="--exclude *.pid --exclude backup/*.zip --exclude atlassian-confluence.log* --exclude catalina.*.log --exclude localhost.*.log --exclude updateTestServer.sh* --exclude daily-backup-* --exclude backup-*.zip --exclude atlassian-jira.log.* --exclude catalina.out --exclude *confluencedata/index* --exclude *confluencedata/backups/* --exclude *prosjektwiki/confluencedata/backups/* --exclude *old/"
@hiorws
hiorws / squareZoom.pde
Created November 20, 2018 14:10 — forked from beesandbombs/squareZoom.pde
square zoom
// zooming squares. by dave
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@hiorws
hiorws / src_MainApp.java
Created November 27, 2018 09:46 — forked from KrabCode/src_MainApp.java
Tessellated spheres source in IntelliJ IDEA - to run this in the vanilla Processing IDE just remove everything that mentions MainApp including the "class MainApp extends PApplet" part and you're golden - also you'll need the PostFX and PeasyCam libraries found in Tools -> Add tool.
import ch.bildspur.postfx.builder.PostFX;
import peasy.PeasyCam;
import processing.core.PApplet;
import processing.core.PShape;
import processing.core.PVector;
import processing.opengl.PShader;
import java.util.ArrayList;
public class MainApp extends PApplet {
@hiorws
hiorws / gif_maker.sh
Created March 20, 2019 12:28 — forked from yanofsky/gif_maker.sh
How to Make a gif from a folder of images
# requirement! install imagemagick
# brew install imagemagick
# or build from source here http://www.imagemagick.org/script/binary-releases.php
#navigate to folder of the images
cd folderofmyimages/
# take every jpg in the folder and smash into a gif with a frame rate of 0.5 sec
convert -delay 50 *.jpg gif_of_my_images.gif
@hiorws
hiorws / OSC_C_01.rb
Created April 8, 2019 10:31 — forked from AlexandreRangel/OSC_C_01.rb
Controling Sonic Pi from Processing OSC
# reading OSC from Processing, Alexandre Enkerli
# full screen, fulltime mouse, Alexandre Rangel
# 24-Nov-2016
# Sonic Pi 2.11
use_bpm 120
set_sched_ahead_time! 0 # Setting that one to a negative value makes Sonic Pi complain, it sounds like.
live_loop :osc do # The loop is inside the fx as this is where the action will be.
osc=sync "/osc" # The OSC message which Processing sends, based on mouse coordinates.