Skip to content

Instantly share code, notes, and snippets.

View jonoirwinrsa's full-sized avatar
🐢
Turtle curling

Jonathan Irwin jonoirwinrsa

🐢
Turtle curling
View GitHub Profile
@rutger1140
rutger1140 / .htaccess
Created July 4, 2013 19:41
Apache Rewrite Rule 301, with Google verification file exclusion
# Redirect your site to domain.com, except google123456789.html files
RewriteEngine On
RewriteRule ^google[0-9a-f]+.html$ - [L]
RewriteRule ^(.*)$ http://domain\.com/$1 [L,R=301]
@defuse
defuse / lib_crypt.php
Created January 31, 2014 23:51
//// BAD CRYPTO CODE //// DO NOT USE THIS CODE ////
<?php
// [LIB - Crypt Functions]
// (c) 2005-2013 unix-world.org - all rights reserved
// code release 2013-05-30
//##################################################### PREVENT S EXECUTION
if(A_HEADER_EXEC_RUNTIME != 'NetVisionOpenSource') {
die('This PHP script: `'.htmlspecialchars(@basename(__FILE__)).'` cannot be executed directly !');
} //end if
//#####################################################
anonymous
anonymous / BirdMan
Created February 9, 2014 15:34
package crappyBird;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
int gap = 20;
void setup() {
size(1000, 1000);
strokeWeight(4);
strokeCap(SQUARE);
frameRate(0.5);
}
void draw() {
@ShaneGowland
ShaneGowland / github-openwith-assistant
Created December 15, 2015 05:18
“Intermediary” executable file that can easily be set as the default associated program for filetypes that then passes the file along to Atom
Module Module1
Sub Main()
'Get the directory path
Dim exe_path As String = (Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\atom\")
'Variable for the highest version
Dim highest_version As New Version("0.0.1")
@rantav
rantav / cloudwatch-event-to-slack-lambda.md
Last active January 14, 2021 03:18
CloudWatch Events to Slack

Sends Cloudwatch Event notifications to Slack

What is this?

AWS have released a new featue called CloudWatch Events, which lets you configure events fired by cloudwatch and direct them to SNS, Lambda functions, etc. Here's the blog post

Motivational image:

Here's the motivational image:

Slack image

@JameelMukadam
JameelMukadam / cloud_functions.md
Created February 22, 2018 12:44
Realtime Programming with Firebase and Cloud Functions (in React Native - Ignite)

Firebase Cloud Functions

  1. npm install -g firebase-tools
  2. Run firebase login and login with your firebase account
  3. Select your project from the list shown to you
  4. Run firebase init functions which creates a functions directory
  5. Add your functions logic
  6. Run firebase deploy

All Done!

@bvaughn
bvaughn / index.md
Last active June 16, 2024 21:50
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@vegard
vegard / primes.py
Created September 21, 2018 07:51
Prime factorisation diagram
# -*- coding: utf-8 -*-
#
# Author: Vegard Nossum <vegard.nossum@gmail.com>
import math
import os
import sys
import cairo
Description: >
Script to create a SSL certificate, S3 bucket and Cloudfront distribution.
###############################################################################
Parameters:
###############################################################################
DomainName:
Type: String
Description: The domain name.