This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;-*- coding: utf-8 -*- | |
;; xmsi-math-symbols-input.el -- a mode to input math chars | |
;; Copyright © 2010, 2011 by Xah Lee | |
;; Author: Xah Lee ( http://xahlee.org/ ) | |
;; Keywords: math symbols, unicode, input | |
;; You can redistribute this program and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
sleeptime = 0.03 | |
def cycle_light(): | |
while True: | |
os.system("echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness") | |
time.sleep(sleeptime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Multiplexer selector pins | |
int mpA = 2; // Yellow cable | |
int mpB = 3; // Red cable | |
int mpC = 4; // Gray cable | |
int mpIN = A1; // Purple COM OUT/IN | |
// Number of potentiometers | |
const int potCount = 8; | |
// Array for voltages of potentiometers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(prelude-require-packages '(window-numbering | |
key-chord | |
iy-go-to-char | |
multiple-cursors | |
;; google-translate | |
writeroom-mode | |
dired-details | |
dired+ | |
dedicated | |
smex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from secrets import g_user, g_pass | |
from datetime import datetime | |
app = Flask(__name__) | |
import gspread | |
# Helpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Helpers */ | |
// Send request to server | |
var sendRequest = function(substance){ | |
var req = new XMLHttpRequest(); | |
req.open('GET', 'http://XXsecretXX:YY/' + substance, true); | |
req.onload = function (e) { | |
if (req.readyState === 4) { | |
if (req.status === 200) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* usbreset -- send a USB port reset to a USB device | |
* | |
* Compile using: gcc -o usbreset usbreset.c | |
* | |
* | |
* */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "Free dynos are allowed 18 hours awake per 24 hour period." | |
# This script keeps the free Heroku dyno awake during daytime. | |
# During night, user needs to wait ~10s for server wakeup. | |
# Tested on Python 2.7.6, should work on *nix machines. | |
# (On Python 3 urllib2 is changed to urllib3..) | |
# Configuration & Usage: | |
# - Setup server endpoints in KEEP_AWAKE_SERVERS env var, separated by space. | |
# eg. `export KEEP_AWAKE_SERVERS="http://app955.herokuapp.com http://asd.me"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line to currently running ITerm2 | |
# session | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# Modified by: Jarkko Saltiola (http://saltio.la) | |
# | |
# Installation: | |
# Add this file path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 6. Kaikille niille projekteille, jotka ovat tulleet toimeen ilman koirrua | |
-- (onimi = ’koirru’), on myönnetty ylimääräinen 5 000 euron | |
-- budjettikorotus. Päivitä vastaavasti tietokantaa. [päivitys koskee | |
-- seuraavia projekteja: Tuubero, Talluke, Iklore, Tuomake, Tuma, Teklari, | |
-- Aboma] | |
UPDATE projekti | |
SET budjetti = budjetti + 5000 | |
WHERE ptun NOT IN | |
(SELECT ptun |
OlderNewer