Skip to content

Instantly share code, notes, and snippets.

View orhanveli's full-sized avatar

orhan orhanveli

  • Finbyte GmbH
  • Turkiye
  • 21:10 (UTC +03:00)
View GitHub Profile
@orhanveli
orhanveli / multiple-rename.bat
Last active August 29, 2015 13:55
PowerShell multiple file rename with string replace
get-childitem *.png | foreach { rename-item $_ $_.Name.Replace(”ico-“, “”) }
@orhanveli
orhanveli / Gruntfile.js
Created March 1, 2014 07:50
closure linter with Grunt
shell: {
closure_linter: '../tools/js/gjslinter/closure_linter',
src: ['app/scripts/controllers',
'app/scripts/services app/scripts/app.js'],
clean_deps: {
command: 'rm -f <%= closureDepsWriter.zwoup.dest %>',
options: {
stdout: true
}
},
@orhanveli
orhanveli / error.cshtml
Created March 3, 2014 08:45
bootstrap has-error for ASP.nET MVC modelstate fields
<div class="form-group @(Html.ViewData.ModelState.IsValidField(Html.IdFor(x => x.UserName)) ? null : "has-error" )">
....
</div>
JG.ShowModal({
"msgtype": "info", //info, error, success
"title": "hello kity",
"message": "lorem ipsum dolor sit amet",
"buttons": [{
"label": JG.Translate("OK"),
"css": "",
"action": function (e, div) {
//e: event,
//div: modal content div jquery object
@orhanveli
orhanveli / text-replace.css
Created March 28, 2014 20:17
news css replace text
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@orhanveli
orhanveli / utils.url.js
Created April 7, 2014 07:15
JavaScript Url, querystring and hash helper class
var Utils = (function (my) {
var _parseQueryStrings = function (querystring) {
if (typeof querystring !== "string") {
throw new Error("Url._parseQueryStrings: you should specify querystring for parsing");
return;
@orhanveli
orhanveli / open_port.sh
Created April 7, 2014 19:41
ubuntu cheat sheet
iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
http://bodhizazen.net/Tutorials/iptables
@orhanveli
orhanveli / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@orhanveli
orhanveli / javascript_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@orhanveli
orhanveli / css_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides