Skip to content

Instantly share code, notes, and snippets.

View molayodecker's full-sized avatar
💭
Wasn’t born with a broadsword in hand but was forced to learn how to wield one

Arthur Decker molayodecker

💭
Wasn’t born with a broadsword in hand but was forced to learn how to wield one
View GitHub Profile
@dainkaplan
dainkaplan / Ansi.java
Last active February 2, 2024 15:12
Simple ANSI colors class for terminal code for JVM written in Scala and Java (two implementations)
package org.tempura.console.util;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Usage:
* <li>String msg = Ansi.Red.and(Ansi.BgYellow).format("Hello %s", name)</li>
* <li>String msg = Ansi.Blink.colorize("BOOM!")</li>
@stephenscaff
stephenscaff / Random Images on Refresh
Last active October 21, 2023 07:29
Super simple way to randomly load new images on refresh via Jquery and DOM injection. Great for banners.
<!DOCTYPE html>
<head>
<!--Little CSS fade in -->
<style>
.fade-in{
-webkit-animation: fade-in 2s ease;
-moz-animation: fade-in ease-in-out 2s both;
-ms-animation: fade-in ease-in-out 2s both;
-o-animation: fade-in ease-in-out 2s both;
@janikvonrotz
janikvonrotz / New-SPSiteWithCustomWebAppAndPoolAndAccount.ps1
Last active September 17, 2019 08:07
PowerShell: Create a new SharePoint Site with a custom web application and managed account and application pool #PowerShell #SharePoint
# modules
Import-Module ActiveDirectory
if((Get-PSSnapin 'Microsoft.SharePoint.PowerShell' -ErrorAction SilentlyContinue) -eq $null){Add-PSSnapin 'Microsoft.SharePoint.PowerShell'}
# new service account
$UserName = "SharePoint Service User Wiki"
$UserUPN = "sa-spwiki@vbl.ch"
$UserSam = "sa-spwiki"
$UserPassword = "pass."
@aabril
aabril / redirect_with_post.js
Created May 6, 2014 09:40
Redirect with POST vars (on jQuery)
// http://stackoverflow.com/a/23347763
var redirect = 'http://www.website.com/page?id=23231';
$.redirectPost(redirect, {x: 'example', y: 'abc'});
// jquery extend function
$.extend(
{
redirectPost: function(location, args)
{
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 2, 2024 22:38
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@chrisciampoli
chrisciampoli / list.js
Last active March 13, 2024 11:11
Javascript List ADT (Abstract Data Type)
function List() {
this.listSize = 0;
this.pos = 0;
this.dataStore = []; // initializes an empty array to store list elements
this.clear = clear;
this.find = find;
this.toString = toString;
this.insert = insert;
this.append = append;
this.remove = remove;
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@vlandham
vlandham / part1.md
Last active March 21, 2024 12:57
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master
@stwiname
stwiname / braintree.d.ts
Last active May 10, 2019 20:08
Typescript definition file for Braintree node module
//TODO update objects to show optional parameters
//TODO expand on Function parameters
//TODO add enum types
//TODO add error types
declare module Braintree {
/**********************
* Errors *
@leonardofed
leonardofed / README.md
Last active July 1, 2024 09:21
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.