This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A shell script to delete / drop all tables from MySQL database. | |
# Usage: ./script user password dbnane | |
# Usage: ./script user password dbnane server-ip | |
# Usage: ./script user password dbnane mysql.nixcraft.in | |
# ------------------------------------------------------------------------- | |
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# ------------------------------------------------------------------------- | |
# This script is part of nixCraft shell script collection (NSSC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_language_switch_links_alter(). | |
*/ | |
function mymodule_language_switch_links_alter(array &$links, $type, $path) { | |
global $language; | |
if ($type == LANGUAGE_TYPE_INTERFACE && isset($links[$language->language])) { | |
foreach ($links as $langcode => &$link) { | |
// If no translation exists, redirect to frontpage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://code.visualstudio.com/docs/setup/setup-overview | |
Command line extension management | |
To make it easier to automate and configure VS Code, it is possible to list, install, and uninstall extensions from the command line. When identifying an extension, provide the full name of the form publisher.extension, for example ms-python.python. | |
Example: | |
code --list-extensions | |
code --install-extension ms-vscode.cpptools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const browserSync = require('browser-sync').create(); | |
const changed = require('gulp-changed'); | |
const concat = require('gulp-concat'); | |
const csso = require('gulp-csso'); | |
const del = require('del'); | |
const gulp = require('gulp'); | |
const htmlmin = require('gulp-htmlmin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Read and edit this file. | |
## Run it once as a root. | |
FILE="/Library/Scripts/ramdisk.sh" | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be a root user" 2>&1 | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local wezterm = require("wezterm") | |
local act = wezterm.action | |
local mux = wezterm.mux | |
local function scheme_for_appearance(appearance) | |
local scheme = {} | |
if appearance:find("Dark") then | |
scheme.name = "BlulocoDark" | |
scheme.background = "#202324" | |
scheme.cursor_fg = "#202324" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
format = "$all$time$jobs$character" | |
[jobs] | |
# symbol = "" | |
format = "[\\[]($style)[$number]($style)[\\]]($style) " | |
number_threshold = 1 | |
# symbol_threshold = 0 |
OlderNewer