Skip to content

Instantly share code, notes, and snippets.

View crguezl's full-sized avatar
🌋

Casiano Rodriguez-Leon crguezl

🌋
View GitHub Profile
@philip-gai
philip-gai / update_githubtoken.sh
Created February 7, 2022 22:14
Update GITHUB_TOKEN in Codespace to work for multiple repositories
# You have to unset the GITHUB_TOKEN, otherwise gh cli will use it and skip auth
unset GITHUB_TOKEN
# List of scopes: https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes
gh auth login --hostname 'github.com' --scopes 'read:org,repo,read:packages'
token="$(gh config get -h github.com oauth_token)"
export GITHUB_TOKEN="$token"
@wldcordeiro
wldcordeiro / egg.js
Last active November 12, 2019 12:52
The Egg programming language from Eloquent JS Chapter 11
function parseExpression(program) {
program = skipSpace(program);
var match, expr;
if (match = /^"([^"]*)"/.exec(program)) {
expr = {type: "value", value: match[1]};
} else if (match = /^\d+\b/.exec(program)) {
expr = {type: "value", value: Number(match[0])};
} else if (match = /^[^\s(),"]+/.exec(program)) {
expr = {type: "word", name: match[0]};
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@emad-elsaid
emad-elsaid / mobile-uploader.rb
Created March 24, 2014 13:32
Uplaod files and images from you android to your desktop/laptop
#!/usr/bin/env ruby
# Author : Emad Elsaid (https://github.com/blazeeboy)
require 'sinatra'
set :port, 3000
set :environment, :production
get '/' do
<<-EOT
<html><head>
@emad-elsaid
emad-elsaid / chat.rb
Created March 1, 2014 13:18
creating simple network chat using ruby
require 'sinatra' # gem install sinatra --no-rdoc --no-ri
set :port, 3000
set :environment, :production
html = <<-EOT
<html><head><style>
#text{width:100%; font-size: 15px; padding: 5px; display: block;}
</style></head><body>
<input id="text" placeholder="Write then press Enter."/>
<div id="chat"></div>
@emad-elsaid
emad-elsaid / regex-tester.rb
Created February 27, 2014 20:46
regular expression testing playground with ruby and sinatra
require 'sinatra' # gem install sinatra --no-ri --no-rdoc
set :port, 3000
html = <<-EOT
<html><head><style>
#regex,#text{ width:100%; font-size:15px; display:block; margin-bottom:5px; }
#text{ height: 200px; }
span{ background:rgb(230,191,161); display:inline-block; border-radius:3px;}
</style></head><body>
<input id="regex" placeholder="Regex"/>
@rxaviers
rxaviers / gist:7360908
Last active July 6, 2024 15:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
require "capybara"
html = DATA.read
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] }
sess = Capybara::Session.new(:selenium, app)
sess.visit("/")
__END__
@KartikTalwar
KartikTalwar / tiny.c
Created July 12, 2012 04:37
Tiny-C Compiler
/* file: "tinyc.c" */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* This is a compiler for the Tiny-C language. Tiny-C is a
@benben
benben / config.ru
Created January 27, 2012 16:45
basic ajax/sinatra example
$:.unshift File.expand_path(File.dirname(__FILE__))
require "viz"
run Sinatra::Application