Skip to content

Instantly share code, notes, and snippets.

:octocat:
Working from home

Noel Yahan noelyahan

:octocat:
Working from home
Block or report user

Report or block noelyahan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active Apr 6, 2020
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@julz
julz / main.go
Created Nov 20, 2015
containersched minicontainer
View main.go
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@PsichiX
PsichiX / grammar.h
Last active Aug 29, 2015
Intuicio++ language syntax
View grammar.h
#ifndef __GRAMMAR_H__
#define __GRAMMAR_H__
#include "std_extension.h"
#include <pegtl.hh>
namespace IntuicioPlusPlus
{
namespace Grammar
{
@sirkkalap
sirkkalap / Install-Docker-on-Linux-Mint.sh
Last active Sep 18, 2019
Install Docker on Linux Mint
View Install-Docker-on-Linux-Mint.sh
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
@learncodeacademy
learncodeacademy / cluster.md
Created Oct 9, 2014
Node Cluster - Enhance your node app by using all the cores of your processor.
View cluster.md

Here's all you have to do to add clustering to your node.js application.

  • save this code as cluster.js, and run cluster.js instead of server.js (or /bin/www, or whatever it's called for your project)
  • the only line you'll need to change is the last line - it needs to point to the location of your server.js file
var cluster = require('cluster');

if (cluster.isMaster) {
  // Count the machine's CPUs
  var cpuCount = require('os').cpus().length;
@sanjogshrestha
sanjogshrestha / To get android key hash code
Created Aug 20, 2014
To get android key hash code and To get Certificate fingerprint(MD5)
View To get android key hash code
To get android key hash code follow these steps
Download the openssl for windows
now unzip to c drive
open cmd prompt
type cd C:\Program Files\Java\jdk1.6.0_26\bin
then type only
keytool -export -alias myAlias -keystore C:\Users\your user name\.android\myKeyStore | C:\openssl-0.9.8k_WIN32 \bin\opens sl sha1 -binary | C:\openssl-0.9.8k_WIN32\bin\openssl enc -a -e
@kelvinn
kelvinn / cmd.sh
Created Jul 24, 2014
Example of using Apache Bench (ab) to POST JSON to an API
View cmd.sh
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@iainconnor
iainconnor / Android Studio .gitignore
Created Jan 24, 2014
A .gitignore for use in Android Studio
View Android Studio .gitignore
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@gre
gre / easing.js
Last active Apr 6, 2020
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity
You can’t perform that action at this time.