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
#!/usr/bin/env python3 | |
import requests | |
from flask import * | |
import random | |
from apscheduler.schedulers.background import BackgroundScheduler | |
app = Flask(__name__) | |
scheduler = BackgroundScheduler() | |
url = "https://reddit.com/r/gonewild/comments.json?limit=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
/** | |
* Copyright 2015 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | |
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License |
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
/// select2 plugin | |
(function (Handsontable) { | |
"use strict"; | |
var Select2Editor = Handsontable.editors.TextEditor.prototype.extend(); | |
Select2Editor.prototype.prepare = function (td, row, col, prop, value, cellProperties) { | |
Handsontable.editors.TextEditor.prototype.prepare.apply(this, arguments); |
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
define([ | |
'jquery', | |
'underscore', | |
'app/app', | |
'moment', | |
'numeral', | |
'app/utils/dateutils', | |
'jquery.handsontable', | |
'bootstrap.datepicker' |
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
// Liquibase SBT dependency is something like this: | |
// "org.liquibase" % "liquibase-core" % "3.0.5" | |
import java.sql.Connection | |
import liquibase.Liquibase | |
import liquibase.resource.FileSystemResourceAccessor | |
import liquibase.database.DatabaseFactory | |
import liquibase.database.jvm.JdbcConnection | |
import liquibase.resource.ClassLoaderResourceAccessor | |
import net.liftweb.common.Logger |
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 requests_oauthlib import OAuth2Session | |
from flask import Flask, request, redirect, session, url_for | |
from flask.json import jsonify | |
import os | |
app = Flask(__name__) | |
# This information is obtained upon registration of a new GitHub | |
client_id = "<your client key>" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
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
# LOL!!1 | |
alias wtf='dmesg' | |
alias onoz='cat /var/log/errors.log' | |
alias rtfm='man' | |
alias visible='echo' | |
alias invisible='cat' | |
alias moar='more' |
NewerOlder