Skip to content

Instantly share code, notes, and snippets.

View ozziexsh's full-sized avatar
🖤

Ozzie Neher ozziexsh

🖤
View GitHub Profile
@ozziexsh
ozziexsh / Bullet.java
Created January 5, 2015 05:22
Shooting Game
package com.teyg;
import java.io.IOException;
import java.nio.file.Paths;
import org.jsfml.graphics.FloatRect;
import org.jsfml.graphics.RenderWindow;
import org.jsfml.graphics.Sprite;
import org.jsfml.graphics.Texture;
import org.jsfml.system.Vector2f;
<div class="products">
<table class="item-list">
{% for item in items %}
<tr>
<td><center>{{item.name}}</center><br><img src="{{ item.imgur }}">
</tr>
{% endfor %}
</table>
</div>
@ozziexsh
ozziexsh / _grid.scss
Last active September 8, 2017 11:45
SCSS Grid Component
$columns: 12;
$grid-breakpoints: (
xs: 0,
sm: 544px,
md: 768px,
lg: 992px,
xl: 1200px
);
var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var cssnano = require('gulp-cssnano');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var SOURCES = {
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
@ozziexsh
ozziexsh / Actions.js
Last active July 13, 2021 05:05
Redux-Saga Generator Example
import { call, put, takeLatest } from 'redux-saga/effects'
import axios from 'axios'
export const FETCH_API_REQUEST = 'FETCH_API_REQUEST';
export const FETCH_API_SUCCESS = 'FETCH_API_SUCCESS';
export const FETCH_API_FAIL = 'FETCH_API_FAIL';
// Moved api call into own function (for easy test swapping)
export function fetchFromApi(userId) {
return axios.get(`/users/${userId}`)
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
public class Madlib {
public static void main(String a[]){
String stream = "My name is NAME and I work at COMPANY";
Pattern pattern = Pattern.compile("\\b[A-Z]{2,}\\b");
// Pattern pattern = Pattern.compile("\\{([A-Za-z0-9]+)\\}"); // use this to replace {word} instead of CAPITALS
import React from 'react';

class ComponentWithState extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            counter: 0,
            name: '',
        }
import React from 'react';

class ComponentWithState extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            counter: 0,
            name: '',
        }
@ozziexsh
ozziexsh / cloudflare.js
Created January 12, 2023 00:40
Deletes all records in a cloudflare dns zone. Useful for when you import a domain into cloudflare and it adds a bunch of useless dns records that you can't bulk delete
const fetch = require("node-fetch");
function baseRequest(url, options) {
return fetch(`https://api.cloudflare.com/client/v4/${url}`, {
headers: {
Authorization: "Bearer YOUR_TOKEN_HERE",
},
...options,
});
}