Skip to content

Instantly share code, notes, and snippets.

View amlang's full-sized avatar
🐢
Works on my machine

Alexander amlang

🐢
Works on my machine
View GitHub Profile
@amlang
amlang / angular-ui-sref-if.js
Last active March 22, 2016 11:57
Conditional control structure for ui.router states
/**
* Conditional control structure for ui.router states
*
* usage in js:
* angular.module('myModuel',['ui.router','ui-sref-if') ......
*
* usage in view:
* <a ui-sref=".nextstate" ui-sref-if="!myForm.$invalid">Next State</a>
*
* sass:
@pedrosancao
pedrosancao / CharsetConversion.php
Last active March 18, 2022 14:10
Code Page 850 to UTF8 conversion, Code Page 850 to Unicode conversion, CP-850 to UTF8 conversion, CP-850 to Unicode conversion, ASCII Latin 1 to UTF8 conversion, ASCII Latin 1 to Unicode conversion
<?php
/**
* Usage: <code>CharsetConversion::CP850toUTF8('your_string');</code>
*
* @author Pedro Sanção <pedro at sancao do co>
* @license MIT Licence
*/
class CharsetConversion {
@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
@chrisjaure
chrisjaure / AngularJS Controller Test.sublime-snippet
Last active December 30, 2016 09:15
AngularJS Jasmine test snippets for Sublime Text 2.
<snippet>
<content><![CDATA[
describe('${1:SuiteName}', function() {
var scope, \$httpBackend, initController;
beforeEach(function() {
module('${2:ModuleName}', function(\$provide){
});