Skip to content

Instantly share code, notes, and snippets.

View coderaven's full-sized avatar
💭
Making the world a better place, one innovation at a time.

Raven coderaven

💭
Making the world a better place, one innovation at a time.
View GitHub Profile
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"window.zoomLevel": 1,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.colorTheme": "Atom One Dark",
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"python.insidersChannel": "weekly",
@coderaven
coderaven / capybara cheat sheet
Created June 11, 2016 17:49 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

###SSH into a remote machine###

ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1

exit: exit ###Install Something###

#If it's a new server, update apt-get first thing
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
// ==UserScript==
// @name Facebook Number Game Hider - By Raven D.
// @namespace http://facebook.com
// @description Will automatically hide number game posts on facebook
// @include http*://*.facebook.com/*
// @version 8
// @grant GM_getValue
// @grant GM_setValue
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@coderaven
coderaven / mixin.py
Created December 30, 2013 02:22 — forked from cyberdelia/mixin.py
# -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.utils.cache import patch_response_headers
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page, never_cache
from django.views.decorators.csrf import csrf_exempt
class NeverCacheMixin(object):
@method_decorator(never_cache)
@coderaven
coderaven / 7segment.c
Last active December 19, 2015 19:49
Interfacing 7 Segment with Parallel Port (Increment and Decrement)
#include <dos.h>
#define OUT 0x378
#define IN 0x379
int d1[10] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09};
int d2[10] = {0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90};
void display(int n){
outportb(OUT,d2[n/10] | d1[n%10]);
delay(100000);
@coderaven
coderaven / name_sorter.c
Created June 28, 2013 16:05
Alphabetical Names Sorter in C
#include <stdio.h>
#include <string.h>
/*** By Raven G. Duran, this is free and open source.. Share to everyone that needs it! :) ***/
int main(){
char name[100][100],temp[100];
int i, j, n;