This file contains hidden or 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 | |
# Replace these values with your actual setup | |
DISPLAY_NAME="HDMI-1" | |
WIDTH=2560 | |
HEIGHT=1080 | |
CUSTOM_MODE_NAME="${WIDTH}x${HEIGHT}" | |
# Check if the display is connected | |
if xrandr | grep -q "$DISPLAY_NAME disconnected"; then |
This file contains hidden or 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 | |
#First you update your system | |
sudo apt-get -y update | |
#install postgresql-9.6 sources | |
touch /etc/apt/sources.list.d/pgdg.list | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/pgdg.list | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ | |
sudo apt-key add - |
This file contains hidden or 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
using System; | |
using System.Threading.Tasks; | |
using Shouldly; | |
using Xunit; | |
namespace ClassLibrary9 | |
{ | |
public class Sample | |
{ |
This file contains hidden or 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 | |
#First you update your system | |
sudo apt-get -y update | |
#install postgresql-9.5 | |
touch /etc/apt/sources.list.d/pgdg.list | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/pgdg.list | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ | |
sudo apt-key add - | |
sudo apt-get update |
This file contains hidden or 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
using Nancy; | |
using Nancy.TinyIoc; | |
namespace NancyBlankTest | |
{ | |
public class CustomBootstrapper : DefaultNancyBootstrapper | |
{ | |
protected override void ConfigureRequestContainer(TinyIoCContainer container, NancyContext context) | |
{ | |
container.Register<IOwinContext, OwinContext>(); |
This file contains hidden or 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
var express = require('express'); | |
var hbs = require('express3-handlebars'); | |
var bodyParser = require('body-parser'); | |
var logger = require('morgan'); | |
var moment = require('moment'); | |
var pg = require('pg'); | |
var port = 3333; | |
var app = express(); |
This file contains hidden or 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 pika | |
import requests | |
import json | |
def send_request(data, url): | |
headers = {'content-type': 'application/json'} | |
requests.post(url, data=data, headers=headers) | |
print "successfully: " + data | |
def on_message(channel, method_frame, header_frame, body): |
This file contains hidden or 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 Adafruit_DHT | |
import pika | |
import threading | |
from datetime import datetime | |
import uuid | |
import time | |
import json | |
sensor = Adafruit_DHT.DHT22 | |
pin = 4 |
This file contains hidden or 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
//small piece of functionality, in this case show a leave form search and it's data | |
Kernel.module.define('LeaveSearchShow', { | |
renderTo: "#leave-search-show", | |
init: function () { | |
var self = this; | |
self.hub.listen('leave-search-fetch-complete', function (data) { | |
self.render(data); |
This file contains hidden or 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 | |
#First you update your system | |
sudo apt-get -y update && sudo apt-get -y upgrade | |
#Add Google Chrome packages | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
#Add mono sources | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
NewerOlder