Skip to content

Instantly share code, notes, and snippets.

View anknetau's full-sized avatar

Andres Kievsky anknetau

View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@lukechampine
lukechampine / monads.c
Last active November 14, 2023 18:22
Maybe and Either Monads in C
#include <stdio.h>
#include <stdbool.h>
// Maybe
typedef struct MaybeInt {
int just;
bool nothing;
} MaybeInt;
@balupton
balupton / README.md
Last active June 5, 2019 10:26
Summary of the Node.js Board controversy from what I can gather
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 19, 2024 14:59
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@misterwell
misterwell / CreateP12PushCert.sh
Last active March 3, 2024 18:42
A shell script for creating a .p12 certificate file containing the Certificate & private key for use by an APNS push provider application
#!/bin/sh
# Script for generating .p12 files from APNS .cer files.
# Instructions:
# 1. Generate & download the push certificate inside Apple's developer portal
# 2. Import the .cer file into your Mac's Keychain Access, find it in your certificate list, and expand it to show the paired private key.
# 3. Select both the certificate and the paired private key, CTRL-Click & select Export Keys. Save it as Certificates.p12 in the same folder as the downloaded .cer file. You may give it a passphrase if you'd like, but be sure to remember it if you do.
# 4. Execute this shell file, with the format './CreateP12PushCert.sh <DownloadedCerFilename> <ExportedP12Filename> <OutputP12Filename>'
usage ()
{

OpenCart Issue #1286

This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.


Damian Bushong

@troystribling
troystribling / gist:2936763
Created June 15, 2012 14:33
Set Title of Terminal Window
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }
@tomohisa
tomohisa / gist:2897676
Created June 8, 2012 19:20
Add and Remove ChildViewController
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',