Skip to content

Instantly share code, notes, and snippets.

View nafeu's full-sized avatar
🕶️
In Virtual Reality

Nafeu Nasir nafeu

🕶️
In Virtual Reality
View GitHub Profile
@silver-xu
silver-xu / ts-boilerplate.md
Last active October 31, 2024 12:16
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@tduarte
tduarte / publish-ghpages.md
Last active October 2, 2024 10:14
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@wesleybliss
wesleybliss / docker-compose-node-mongo.yml
Created September 9, 2016 21:37
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@ocello3
ocello3 / Metro.pde
Created January 13, 2016 21:09
Metronome class in processing (BPM, beat)
class Metro {
float bpm;
float nextTime = 0;
int mode = 0;
int modeNum;
Metro(float _bpm, int _modeNum) {
bpm = _bpm;
modeNum = _modeNum;
}
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 14, 2024 15:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@EpokK
EpokK / ngEnter.js
Last active January 7, 2022 13:57
ngEnter directive if you can use submit form(https://twitter.com/ririlepanda)
app.directive('ngEnter', function() {
return function(scope, element, attrs) {
element.bind("keydown keypress", function(event) {
if(event.which === 13) {
scope.$apply(function(){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
@kareemgrant
kareemgrant / gitignore.txt
Last active March 24, 2017 14:40
Common gitignore
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
*.rbc
*.sassc
.sass-cache
capybara-*.html
@alehandrof
alehandrof / Default.sublime-keymap
Last active October 3, 2017 16:13
Modal Navigation for: Sublime 3 w/ MultiBind & Colemak
// MultiBind
// Modal Navigation for Colemak -- inspired by [Miniguru](http://www.guru-board.com/english/layout_en)
{ "keys": ["alt+'"], "command": "multibind_toggle", "args" : { "layout": "modal-nav-colemak" } },
{ "keys": ["ctrl+shift+'"], "command": "multibind_show" },
{ "keys": ["escape"], "command": "multibind_toggle", "args" : { "layout": "default" }, "context": [ { "key": "multibind.modal-nav-colemak" } ] },
{ "keys": ["n"], "command": "move", "args": {"by": "characters", "forward": false}, "context": [ { "key": "multibind.modal-nav-colemak" } ] },
{ "keys": ["i"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ { "key": "multibind.modal-nav-colemak" } ] },
{ "keys": ["u"], "command": "move", "args": {"by": "lines", "forward": false}, "context": [ { "key": "multibind.modal-nav-colemak" } ] },
@cobyism
cobyism / gh-pages-deploy.md
Last active November 11, 2024 00:02
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).