Skip to content

Instantly share code, notes, and snippets.

View JALsnipe's full-sized avatar
🥴

Josh Lieberman JALsnipe

🥴
View GitHub Profile
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
%{
#include<stdio.h>
int nums = 0;
%}
number [0-9]
%%
%{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int longest = 0;
char *word = NULL;
%}
%option noyywrap
SELECT s.sid, s.sname, m.dname, s.gpa, e.dname, e.cno, e.grade
FROM student s, enroll e, major m
WHERE s.sid = e.sid AND s.sid = m.sid AND
(SELECT AVG(e1.grade)
FROM enroll e1
WHERE s.sid = e1.sid AND e1.dname in (
SELECT m1.dname
FROM major m1
WHERE s.sid = m1.sid)) <
(SELECT AVG(e2.grade)
SELECT *
FROM (SELECT s.cno, s.dname
FROM section s, prof p, enroll e
WHERE s.cno = e.cno AND s.dname = p.dname AND s.dname = e.dname AND s.dname IN(
SELECT m.dname
FROM major m
GROUP BY m.dname
HAVING COUNT(*) > 8)
GROUP BY s.cno, s.dname
SELECT cno, dname, b.count_of_students
FROM
(SELECT COUNT(*) AS num_of_students
FROM student s, enroll e
WHERE s.sid = e.sid) a,
(
SELECT c.cno, c.dname, COUNT(*) as count_of_students
FROM course c RIGHT OUTER JOIN enroll e
ON c.cno = e.cno
WHERE c.cno = e.cno AND c.dname = e.dname
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# calc.py
#
# A simple calculator with variables. This is from O'Reilly's
# "Lex and Yacc", p. 63.
#
# Class-based example contributed to PLY by David McNab
# -----------------------------------------------------------------------------
@JALsnipe
JALsnipe / iOS.gitignore
Created August 24, 2014 23:09
Applico iOS .gitignore
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
#import <Foundation/Foundation.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
@interface NSString (PSPDFModernizer)
// Added in iOS 8, retrofitted for iOS 7
- (BOOL)containsString:(NSString *)aString;
@end
@JALsnipe
JALsnipe / download.js
Last active August 29, 2015 14:07 — forked from adammw/download.js
/*
* CLI Tool to download streamable songs from SoundCloud API
* Requires Node.js, Flow-JS and cli libraries
*/
var cli = require('cli').enable('status'),
fs = require('fs'),
flow = require('flow'),
path = require('path'),
SC = require('./node-soundcloud.js');