Skip to content

Instantly share code, notes, and snippets.

View jxc876's full-sized avatar
:octocat:

Michael Ramirez jxc876

:octocat:
  • Texas, United States
View GitHub Profile
@igogrek
igogrek / How I stopped loving Angular.md
Last active April 2, 2024 03:00
How I stopped loving Angular

I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.

It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.

Today I refuse to use it in my next project myself.

public class Volatility {
static int NEXT_IN_LINE = 0;
public static void main(String[] args) throws Exception {
new CustomerInLine().start();
new Queue().start();
}
static class CustomerInLine extends Thread {
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mainyaa
mainyaa / angular-promise-all-nested-test.coffee
Last active December 31, 2015 22:39
unit testing nested $q.all().
'use strict'
# dependencies angularjs, karma, karma-mocha, mocha, chai, lodash
describe 'Unit: $q.all', () ->
describe 'should simulate nested promise', ->
scope = null
q = null
promise1resolved = false
@ngandriau
ngandriau / Sandbox.groovy
Created July 6, 2013 17:34
surprise when using string variable/constant as Map's key
// Illustration of a side effect when using string variable/constant for map's key
def PROP_NAME = "property name"
def myMap = [PROP_NAME: "a Value"]
//assert myMap.keySet().iterator().next() == "property name"
// fails at runtime but it compiles.
// I was expecting the value of the variable to be the key, but it is in fact a String with the name of the variable
@schup
schup / Engine.java
Created April 16, 2013 17:27
Implementing an Interface in Groovy and using it in Java through javax.script / JSR-223
// Engine.java
public interface Engine {
void start();
void stop();
}
@passy
passy / jade.md
Last active August 17, 2020 09:35
Using Yeoman and Jade

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

@sunggun-yu
sunggun-yu / gist:4731865
Created February 7, 2013 15:57
Using external message resource file in Spring ReloadableResourceBundleMessageSource.
<!-- MessageSource -->
<!-- /usr/local/conf/app/messages/messages_en_US.properties -->
<beans:bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<beans:property name="basename">
<beans:value>file:/usr/local/conf/app/messages/messages</beans:value>
</beans:property>
<beans:property name="cacheSeconds" value="600" />
</beans:bean>
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@thbkrkr
thbkrkr / Default (Linux).sublime-keymap
Last active August 31, 2022 03:54
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },