Skip to content

Instantly share code, notes, and snippets.

View andru255's full-sized avatar
🇵🇪
:)

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
@jansanchez
jansanchez / gist:10315048
Last active September 6, 2016 16:23
samba and fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# /home was on /dev/sda3 during installation
@staltz
staltz / introrx.md
Last active September 17, 2026 13:53
The introduction to Reactive Programming you've been missing
@nvkiet
nvkiet / [Swift] Switch-RootViewController
Last active January 28, 2025 07:46
Switch root view controller
func switchRootViewController(rootViewController: UIViewController, animated: Bool, completion: (() -> Void)?) {
if animated {
UIView.transitionWithView(window, duration: 0.5, options: .TransitionCrossDissolve, animations: {
let oldState: Bool = UIView.areAnimationsEnabled()
UIView.setAnimationsEnabled(false)
self.window!.rootViewController = rootViewController
UIView.setAnimationsEnabled(oldState)
}, completion: { (finished: Bool) -> () in
if completion {
completion!()
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@PuercoPop
PuercoPop / not-mac.xkb
Last active July 2, 2016 15:51
My Keyboard layout for Linux, mimicing the mac layout
xkb_keymap {
xkb_keycodes "evdev+aliases(qwerty)" {
minimum = 8;
maximum = 255;
<ESC> = 9;
<AE01> = 10;
<AE02> = 11;
<AE03> = 12;
<AE04> = 13;
<AE05> = 14;
@Starefossen
Starefossen / remoteDataTableView.swift
Last active January 16, 2023 09:50
Remote JSON Data to tableView in iOS 8.0 (Swift)
import UIKit
import Foundation
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely()
class RemoteAPI {
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void {
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software")
let ses = NSURLSession.sharedSession()
@KensoDev
KensoDev / .tmux.conf
Created August 31, 2014 09:03
my tmux configuration
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
@PuercoPop
PuercoPop / generate.js
Created September 10, 2014 07:41
Código para mi presentación en LimaJS, diapositivas en https://slides.com/puercopop/escodgen/
#!/usr/bin/js
var fs = require('fs');
var escodegen = require('escodegen');
var inputFile = process.argv[2] ? process.argv[2] : "/home/puercopop/tmp.js";
var outputFile = process.argv[3] ? process.argv[3] : "/home/puercopop/a.js";
var code;
fs.readFile(inputFile, 'utf8', function (err, data) {
*.pyc
*.jpe
*.png
@anareyna
anareyna / standards.md
Last active January 23, 2023 20:03
Estándares Frontend-Labs

Diccionario

  • Camel case:

    • Ejm: elementName
  • Snake case:

    • Ejm: element_name

Prefijos comunes