Skip to content

Instantly share code, notes, and snippets.

View metame's full-sized avatar

metame metame

  • The meta Method
  • United States
View GitHub Profile
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@ashsmith
ashsmith / .gitignore
Last active April 22, 2022 00:06
Magento 1.x .gitignore
# Never save database creditentials in your repo. Keep a dummy copy with a different name eg "local.xml.dev"
app/etc/local.xml
downloader
# If you'd like to keep the downloader, use the following instead:
# downloader/.cache
# downloader/cache.cfg
# downloader/connect.cfg
# All of the var folders can be excluded.
@joaoneto
joaoneto / login.test.js
Created March 13, 2013 13:49
Login session test with mocha
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
request(app)
.post('/v1/sessions')
Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first
which breaks when you're using CommonJS with webpack.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-bs (bootstrap)
Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd
Create a loader "exception" just for DT in webpack.config.js:
module: {
loaders: [

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@rainbyte
rainbyte / monads.md
Last active October 25, 2017 17:51
Some thoughts about monads

Monads Conceptually

Fundamental knowledge

Before talking about monads, we should review 3 concepts:

Functions

They appear in the form f :: a -> b, where :: indicates the type of f.

@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte