This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| print("UPDATE AUG 2023: this script is beyond old and broken") | |
| print("You may find interesting and more up to date resources in the comments of the gist") | |
| exit() | |
| from slacker import Slacker | |
| import json | |
| import argparse | |
| import os | |
| # This script finds all channels, private channels and direct messages |
| #!/bin/bash | |
| gitlab_user="git" | |
| if [[ "$(whoami)" == "$gitlab_user" ]] | |
| then | |
| echo "Searching for errors and corecting them" | |
| else | |
| echo "Nope, wrong user. Trying to login as $gitlab_user" | |
| su "$gitlab_user" -c "$0" |
| using System; | |
| namespace FortyOneShades | |
| { | |
| class Program | |
| { | |
| static int[] values = new int[]{ | |
| 0x276AD9, | |
| 0x3E6FD9, | |
| 0x3A6FDE, |
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
| install: | |
| - "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5" | |
| - "sudo apt-get autoremove" | |
| - "sudo apt-get install libaio1" | |
| - "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/" | |
| - "sudo dpkg -i mysql-5.6.14.deb" | |
| - "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server" | |
| - "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/" | |
| # some config values were changed since 5.5 | |
| - "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf" |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| /** | |
| * Filter to check for CSRF attacks from the ajax requests. | |
| */ | |
| Route::filter('csrf_header', function() | |
| { | |
| if (Session::token() != Request::header('x-csrf-token')) | |
| { | |
| throw new Illuminate\Session\TokenMismatchException; | |
| } | |
| }); |
| #!/bin/bash | |
| # args | |
| MSG=${1-'deploy from git'} | |
| BRANCH=${2-'trunk'} | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH |